#1
⏱️ 127.4 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#2
⏱️ 541.64 мс
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
⏱️ 215.86 мс
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.65 мс
select * from "canonical_products" where "canonical_products"."id" in (6)
#5
⏱️ 8.37 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[6]
#6
⏱️ 20.4 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1469150,1457784,1455751,1455745,1455741,1433604,364789,315368,206567,199856,198874,195457,175170,175169,171783,168014,164080,161333,161332,155100,153988,152127,151280,1909143,true,125,452]
#7
⏱️ 6.16 мс
select * from "stores" where "stores"."id" in (125)
#8
⏱️ 13.06 мс
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,2608194,1469150,1457784,1455751,1455745,1455741,1433604,364789,315368,206567,199856,198874,195457,175170,175169,171783,168014,164080,161333,161332,155100,153988,152127,151280,1909143,0,125,452]
#9
⏱️ 27.26 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6247465,103296947,6268198,6268268,6257928,17861414,11222125,11217055,2295761,2297030,2294257,103959342,2298237,11215437,11234326,11202406,78055198,11223430,31330824,31330830,11235394,89199261,29757496,103961462,11202116,11203753,11229421,11197838,31333774,11216892,11205538,11208503]
#10
⏱️ 14.16 мс
select * from "stores" where "stores"."id" in (125, 452)
#11
⏱️ 8.76 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-shmona"]
#12
⏱️ 13.98 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.36 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]