#1
⏱️ 158.18 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"krayot"]
#2
⏱️ 3719.76 мс
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",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#3
⏱️ 1074.64 мс
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",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#4
⏱️ 15.69 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 10.26 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 34.15 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[75165094,8775770,3173539,2991635,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,2037598,1932597,1918295,1913217,1913216,1908313,1908290,1463665,1462617,1458529,1458528,1458526,1456529,1451644,825495,816471,498260,493305,454494,98914,true,735,1188,1293,290,154,430,506,660,1397,99]
#7
⏱️ 12.3 мс
select * from "stores" where "stores"."id" in (99, 290, 735)
#8
⏱️ 18.11 мс
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,8775770,3173539,2991635,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,2037598,1932597,1918295,1913217,1913216,1908313,1908290,1463665,1462617,1458529,1458528,1458526,1456529,1451644,825495,816471,498260,493305,454494,98914,0,735,1188,1293,290,154,430,506,660,1397,99]
#9
⏱️ 29.07 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4399839,4396358,988408,5184561,5178594,5184781,5184783,985884,5169591,5172367,5172391,5193348,85127552,29401577,2021908,2019936,2024604,10543936,2026347,2027283,2021576,2020889,10532451,29388333,10531185,54044542,2623690,62795753,2626076,30385059,2626499,47892608,3854038,9558989,9604299]
#10
⏱️ 10.61 мс
select * from "stores" where "stores"."id" in (99, 290, 430, 506, 735)
#11
⏱️ 9.74 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["krayot"]
#12
⏱️ 12.47 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 22.54 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]