#1
⏱️ 111.48 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"safed"]
#2
⏱️ 936.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","sauces_oils",101,275,true,101,275]
#3
⏱️ 406.13 мс
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","sauces_oils",101,275,true,101,275]
#4
⏱️ 15.18 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 12.84 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 38.5 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[39417299,2037598,1972068,1932597,1918295,1908313,1908290,1463665,1458529,1458528,1458526,1456529,1453735,825495,498260,440827,379022,277237,265819,252303,251968,245041,244240,193775,191910,186370,179119,170547,169759,169354,168908,168906,98914,true,101,275]
#7
⏱️ 11.18 мс
select * from "stores" where "stores"."id" in (101, 275)
#8
⏱️ 14.23 мс
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 = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[39417299,2037598,1972068,1932597,1918295,1908313,1908290,1463665,1458529,1458528,1458526,1456529,1453735,825495,498260,440827,379022,277237,265819,252303,251968,245041,244240,193775,191910,186370,179119,170547,169759,169354,168908,168906,98914,0,101,275]
#9
⏱️ 27.82 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6216114,6222184,6223936,61416758,48434723,6765088,6224053,81725341,6219806,5402803,5373720,5402561,5378700,5384146,5400367,5402586,5390055,5378802,5385987,5390288,5390290,5390291,5378794,5379076,5379100,5398370,5373964,5402630,85127607]
#10
⏱️ 9.32 мс
select * from "stores" where "stores"."id" in (101, 275)
#11
⏱️ 9.16 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["safed"]
#12
⏱️ 14.59 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 10.91 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]