#1
⏱️ 110.89 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"zikhron-yaakov"]
#2
⏱️ 1830.01 мс
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",443,616,435,347,true,443,616,435,347]
#3
⏱️ 1001.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",443,616,435,347,true,443,616,435,347]
#4
⏱️ 11.16 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 13.39 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 17.49 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[75165094,66413048,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,4544898,4544894,3931378,3227854,2953667,2811192,2807243,2752605,2702263,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1913217,1458529,1458528,1458526,98914,true,443,616,435,347]
#7
⏱️ 14.32 мс
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:
[75165094,66413048,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,4544898,4544894,3931378,3227854,2953667,2811192,2807243,2752605,2702263,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1913217,1458529,1458528,1458526,98914,0,443,616,435,347]
#8
⏱️ 34.97 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[760665,67734856,2091765,2088429,2087123,2085138,29470779,2091442,2095074,2096484,29467553,2084619,2093300,33248327,56090844,32980775,32980919,1830283,1829271,29209860,1819006,10329722,1830077,1831470,1826379,1821890,1827947,32993954,67490866,2898024,2891911,2901365,2899038,12193635,12193649,3208793,3209318,3209784,3212193,3212194,3212361,3212432,3213268,3213380,3215600,72642483]
#9
⏱️ 11.51 мс
select * from "stores" where "stores"."id" in (347, 435, 443, 616)
#10
⏱️ 14.89 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["zikhron-yaakov"]
#11
⏱️ 10.81 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 14.45 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]