#1
⏱️ 205.17 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beit-shemesh"]
#2
⏱️ 2748.06 мс
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",742,273,479,24,true,742,273,479,24]
#3
⏱️ 836.08 мс
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",742,273,479,24,true,742,273,479,24]
#4
⏱️ 24.62 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 14.86 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 42.67 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[8775770,7443308,7440957,2807243,2752605,2658241,2037598,1918295,1913217,1913216,1908290,1462617,1458529,1458528,1458526,1456529,825495,498260,440827,284492,277237,265819,251968,245041,193775,191910,189360,186370,179119,173524,170547,169759,98914,true,742,273,479,24]
#7
⏱️ 9.98 мс
select * from "stores" where "stores"."id" in (24, 273, 742)
#8
⏱️ 31.35 мс
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:
[8775770,7443308,7440957,2807243,2752605,2658241,2037598,1918295,1913217,1913216,1908290,1462617,1458529,1458528,1458526,1456529,825495,498260,440827,284492,277237,265819,251968,245041,193775,191910,189360,186370,179119,173524,170547,169759,98914,0,742,273,479,24]
#9
⏱️ 43.68 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5881497,5891243,17220655,22178445,5893353,5893575,69580629,5886527,5748214,5748296,5773058,5751083,5756104,5770725,5773081,5763648,5758605,5763854,5763856,5763857,5753389,5748422,5748423,5770392,85127738,12046054,2522107,31670943,2518779,12057317,30219101,33781026,31673519,31671577,9558329,3854045,9558996,9604306]
#10
⏱️ 9.99 мс
select * from "stores" where "stores"."id" in (24, 273, 479, 742)
#11
⏱️ 13.94 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beit-shemesh"]
#12
⏱️ 14.33 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.07 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]