#1
⏱️ 213.1 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"afula"]
#2
⏱️ 1676.24 мс
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",599,197,501,121,242,353,true,599,197,501,121,242,353]
#3
⏱️ 606.98 мс
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",599,197,501,121,242,353,true,599,197,501,121,242,353]
#4
⏱️ 27.49 мс
select * from "canonical_products" where "canonical_products"."id" in (145)
#5
⏱️ 11.32 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[145]
#6
⏱️ 15.23 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[7518269,4990576,4990374,4988227,4987429,3458976,2702452,2640775,2640774,2608194,1472108,1472107,1469150,1433604,685427,364789,274786,206567,199856,195457,195236,194752,194598,193170,193051,192386,192377,192327,189702,175170,175169,171783,true,599,197,501,121,242,353]
#7
⏱️ 15.46 мс
select * from "stores" where "stores"."id" in (121, 197, 242, 353)
#8
⏱️ 22.96 мс
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 = 192386 THEN 192327 WHEN sp.master_product_id = 192327 THEN 192327 ELSE sp.master_product_id END limit 500
Bindings:
[7518269,4990576,4990374,4988227,4987429,3458976,2702452,2640775,2640774,2608194,1472108,1472107,1469150,1433604,685427,364789,274786,206567,199856,195457,195236,194752,194598,193170,193051,192386,192377,192327,189702,175170,175169,171783,0,599,197,501,121,242,353]
#9
⏱️ 13.21 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6407578,6401668,8119988,52689786,5415373,12243789,19010773,19010774,90760170,90777045,62754852,90777945,2598226,2598227,90766039,12243770,2824923,2827022,2827062,2827607,2827711,2828901,2829049,2829386,12088062,2833090,2829557,3164085,7816029,3170145,3167873,3166957,3167755,3169902,3170104]
#10
⏱️ 13.88 мс
select * from "stores" where "stores"."id" in (121, 197, 242, 501, 599)
#11
⏱️ 7.74 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["afula"]
#12
⏱️ 16.49 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 20.26 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]