#1
⏱️ 170.8 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#2
⏱️ 761.13 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_slug" = ? and (exists (select 1 from "store_prices" where "store_prices"."master_product_id" = "master_products"."id" and "store_prices"."store_id" in (?, ?)) or exists (select 1 from "deals" where "deals"."master_product_id" = "master_products"."id" and "deals"."is_active" = ? and "deals"."store_id" in (?, ?)))
Bindings:
["grocery","baking_spices",125,452,true,125,452]
#3
⏱️ 313.64 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_slug" = ? and (exists (select 1 from "store_prices" where "store_prices"."master_product_id" = "master_products"."id" and "store_prices"."store_id" in (?, ?)) or exists (select 1 from "deals" where "deals"."master_product_id" = "master_products"."id" and "deals"."is_active" = ? and "deals"."store_id" in (?, ?))) order by CASE WHEN master_products.image_url IS NOT NULL AND master_products.image_url != '' THEN 0 ELSE 1 END, "master_products"."id" desc limit 32 offset 0
Bindings:
["grocery","baking_spices",125,452,true,125,452]
#4
⏱️ 12.2 мс
select * from "canonical_products" where "canonical_products"."id" in (6)
#5
⏱️ 11.87 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[6]
#6
⏱️ 21.35 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,1469150,1455751,1455745,1455741,1433604,364789,315368,206567,199856,198874,195457,175170,175169,171783,168014,161333,161332,155100,153988,152127,151280,135564,134966,134616,1909143,true,125,452]
#7
⏱️ 10.13 мс
select * from "stores" where "stores"."id" in (125)
#8
⏱️ 23.4 мс
select min(sp.id) as best_sp_id from "store_prices" as "sp" where "sp"."master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "sp"."price" > ? and "sp"."store_id" in (?, ?) group by sp.store_id, CASE WHEN sp.master_product_id = 1909143 THEN 198874 WHEN sp.master_product_id = 198874 THEN 198874 ELSE sp.master_product_id END limit 500
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,1469150,1455751,1455745,1455741,1433604,364789,315368,206567,199856,198874,195457,175170,175169,171783,168014,161333,161332,155100,153988,152127,151280,135564,134966,134616,1909143,0,125,452]
#9
⏱️ 34.12 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6247337,6247465,6268198,6268268,6257928,17861414,2297744,78062220,2297770,11222125,11217055,2295761,2297030,2294257,2298237,11215437,11234326,11202406,78055198,11223430,31330824,31330830,11235394,29757496,11202116,11203753,11229421,11197838,31333774,11216892,11205538,11208503]
#10
⏱️ 9.69 мс
select * from "stores" where "stores"."id" in (125, 452)
#11
⏱️ 10.95 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-shmona"]
#12
⏱️ 13.33 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.07 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]