#1
⏱️ 274.38 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beit-shemesh"]
#2
⏱️ 3616.68 мс
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
⏱️ 1174.75 мс
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
⏱️ 21.29 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 13.89 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 53.12 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[75165094,8775770,7443308,7440957,3931378,3484014,2811192,2807243,2752605,2671353,2669776,2658241,2631542,2037598,1918295,1913217,1913216,1908290,1468660,1462617,1458529,1458528,1458526,1456529,825495,499398,498260,440827,284492,277237,265819,251968,98914,true,742,273,479,24]
#7
⏱️ 12.53 мс
select * from "stores" where "stores"."id" in (24, 273, 742)
#8
⏱️ 48.44 мс
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 = 1458529 THEN 1458529 WHEN sp.master_product_id = 98914 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,8775770,7443308,7440957,3931378,3484014,2811192,2807243,2752605,2671353,2669776,2658241,2631542,2037598,1918295,1913217,1913216,1908290,1468660,1462617,1458529,1458528,1458526,1456529,825495,499398,498260,440827,284492,277237,265819,251968,98914,0,742,273,479,24]
#9
⏱️ 61.24 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[17220655,22178445,5893353,5893575,69580629,5886527,5773081,5763648,5758605,5763854,5763856,5763857,5753389,5748422,5748423,5770392,85127738,45108818,2518779,90157063,12057317,90157188,90160226,30219101,33781026,97067500,90172310,90181318,31673519,31671577,90181314,9558329,3854045,9558996,9604306]
#10
⏱️ 6.52 мс
select * from "stores" where "stores"."id" in (24, 273, 479, 742)
#11
⏱️ 11.81 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beit-shemesh"]
#12
⏱️ 14.63 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 24.27 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]