#1
⏱️ 231.69 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 584.97 мс
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",287,true,287]
#3
⏱️ 293.95 мс
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",287,true,287]
#4
⏱️ 13.77 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 8.84 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 16.66 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[39417299,2037598,1918295,1913217,1913216,1908290,1463665,1458529,1458528,1458526,1456529,1453735,498260,440827,245041,193775,191910,186370,170547,169354,165320,164636,161877,161699,161515,158045,158044,156282,135384,134684,134102,134070,98914,true,287]
#7
⏱️ 5.67 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 14.24 мс
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,1918295,1913217,1913216,1908290,1463665,1458529,1458528,1458526,1456529,1453735,498260,440827,245041,193775,191910,186370,170547,169354,165320,164636,161877,161699,161515,158045,158044,156282,135384,134684,134102,134070,98914,0,287]
#9
⏱️ 12 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5281669,5281675,5271483,5296567,5276647,5281512,5281513,5284464,5286557,5286595,5291688,5291911,5297459,5271465,5296682,5274410,5281514,5296346,5296715,5286684,5276486,5281824,5286872,5286874,5286875,5276476,5276712,5271714,5271715,5294013,85127578]
#10
⏱️ 10.19 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 11.57 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#12
⏱️ 18.89 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.18 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]