#1
⏱️ 165.39 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramat-hasharon"]
#2
⏱️ 403.93 мс
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",646,142,true,646,142]
#3
⏱️ 145.91 мс
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",646,142,true,646,142]
#4
⏱️ 2.8 мс
select * from "canonical_products" where "canonical_products"."id" in (320)
#5
⏱️ 2.76 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[320]
#6
⏱️ 20.16 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[4536333,1434518,506053,452321,314342,314335,314328,192680,152128,133426,132282,132281,127587,115193,114180,108733,108521,108520,108094,108093,107426,106713,106708,106703,106697,106024,105675,105674,105673,105672,105671,105669,4546240,true,646,142]
#7
⏱️ 7.49 мс
select * from "stores" where "stores"."id" in (142)
#8
⏱️ 11.08 мс
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,452321,314342,314335,314328,192680,152128,133426,132282,132281,127587,115193,114180,108733,108521,108520,108094,108093,107426,106713,106708,106703,106697,106024,105675,105674,105673,105672,105671,105669,4546240,0,646,142]
#9
⏱️ 16.3 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5526238,5526240,5526241,5526242,5526243,5526244,5528301,5531061,5531068,5531072,5531078,5535713,51603395,51603396,5541136,5541137,5542393,5531106,5519262,61895647,5519339,5504532,5514636,5528219,5528222,5528227,67771513,67771512]
#10
⏱️ 7.28 мс
select * from "stores" where "stores"."id" in (142)
#11
⏱️ 7.9 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramat-hasharon"]
#12
⏱️ 10.55 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.38 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]