#1
⏱️ 155.77 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"maalot"]
#2
⏱️ 461.16 мс
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","canned_preserves",5,187,true,5,187]
#3
⏱️ 275.96 мс
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","canned_preserves",5,187,true,5,187]
#4
⏱️ 22.36 мс
select * from "canonical_products" where "canonical_products"."id" in (320)
#5
⏱️ 11.94 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[320]
#6
⏱️ 21.84 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[4536333,1434518,506053,366432,314345,314342,314340,314335,314331,314329,192680,160421,159470,159469,152128,133426,132282,132281,127587,126828,115193,114180,108733,108521,108520,108519,108518,108094,108093,107426,106713,106708,4546240,true,5,187]
#7
⏱️ 9.74 мс
select * from "stores" where "stores"."id" in (5)
#8
⏱️ 19.3 мс
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 = 4546240 THEN 192680 WHEN sp.master_product_id = 192680 THEN 192680 ELSE sp.master_product_id END limit 500
Bindings:
[4536333,1434518,506053,366432,314345,314342,314340,314335,314331,314329,192680,160421,159470,159469,152128,133426,132282,132281,127587,126828,115193,114180,108733,108521,108520,108519,108518,108094,108093,107426,106713,106708,4546240,0,5,187]
#9
⏱️ 19.66 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1558882,1558889,1559625,1560310,1560311,1560747,1560748,1560749,1560750,1560962,1558916,1559166,1556223,1557587,1556538,1556539,1556612,1553869,1556685,1556687,1556958,1555565,1558077,1558078,1558080,1558084,1558086,1558090,1558912,45919767,67364023,67364022]
#10
⏱️ 6.68 мс
select * from "stores" where "stores"."id" in (5)
#11
⏱️ 12.28 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["maalot"]
#12
⏱️ 16.39 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 22 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]