#1
⏱️ 25.87 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"nahariya"]
#2
⏱️ 119.47 мс
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:
["snacks","chips_savory",766,1123,1254,446,1362,10,241,410,true,766,1123,1254,446,1362,10,241,410]
#3
⏱️ 125.23 мс
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:
["snacks","chips_savory",766,1123,1254,446,1362,10,241,410,true,766,1123,1254,446,1362,10,241,410]
#4
⏱️ 1.61 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 0.68 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 3.3 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5127697,3605772,2896439,2742017,2671000,2670972,2667237,362443,281889,281449,264842,242656,208252,208251,207716,197740,182693,182692,182438,182437,182094,180263,169883,169754,165452,165434,164977,164690,164651,164650,164464,161499,3702666,true,766,1123,1254,446,1362,10,241,410]
#7
⏱️ 0.89 мс
select * from "stores" where "stores"."id" in (10, 241, 410)
#8
⏱️ 2 мс
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 = 3702666 THEN 2667237 WHEN sp.master_product_id = 2667237 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[5127697,3605772,2896439,2742017,2671000,2670972,2667237,362443,281889,281449,264842,242656,208252,208251,207716,197740,182693,182692,182438,182437,182094,180263,169883,169754,165452,165434,164977,164690,164651,164650,164464,161499,3702666,0,766,1123,1254,446,1362,10,241,410]
#9
⏱️ 13.11 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6255226,6258760,6255212,5611481,926207,924490,5611635,5611636,926820,1504981,5145385,5145386,1508881,5161142,5136860,5136861,1504966,1506996,1504967,46185023,5121652,46178215,2224788,31251808,2237609,2229452,10982582,29615374,2229431,11019772,2233330,2227853,2227913,2236104,2226749,2226775,10981306,2237003,2231184]
#10
⏱️ 3.25 мс
select * from "stores" where "stores"."id" in (10, 241, 410, 446)
#11
⏱️ 1.55 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["nahariya"]
#12
⏱️ 1.23 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.28 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]