#1
⏱️ 96.91 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"krayot"]
#2
⏱️ 769.14 мс
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","baking_spices",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#3
⏱️ 532.32 мс
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","baking_spices",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#4
⏱️ 19.28 мс
select * from "canonical_products" where "canonical_products"."id" in (225)
#5
⏱️ 9.45 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[225]
#6
⏱️ 42.75 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1908616,1908615,1469150,1457784,1455751,1455745,1455741,1455708,1455705,1455698,1455697,1451739,1433604,715776,704477,685427,364789,274786,256300,249388,248808,206567,199856,100585,97793,true,735,1188,1293,290,154,430,506,660,1397,99]
#7
⏱️ 12.57 мс
select * from "stores" where "stores"."id" in (99, 290, 735)
#8
⏱️ 15.57 мс
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 = 1455697 THEN 1455697 WHEN sp.master_product_id = 100585 THEN 1455697 WHEN sp.master_product_id = 97793 THEN 1455697 ELSE sp.master_product_id END limit 500
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1908616,1908615,1469150,1457784,1455751,1455745,1455741,1455708,1455705,1455698,1455697,1451739,1433604,715776,704477,685427,364789,274786,256300,249388,248808,206567,199856,100585,97793,0,735,1188,1293,290,154,430,506,660,1397,99]
#9
⏱️ 38.8 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4413542,4390930,4384866,4390734,4387967,4390823,4394187,4387729,988384,985165,5181710,984808,5163520,984703,5175716,65970879,74565865,5175740,5175744,5175747,5181721,5172750,5172751,2022639,2023325,67658282,2024399,10543301,29398104,29397376,2014001,2014495,2019783,2021138,2024034,10547251,29390584,2016590,19077538,2624492,47898346,9579689]
#10
⏱️ 10.56 мс
select * from "stores" where "stores"."id" in (99, 290, 430, 506, 735)
#11
⏱️ 12.41 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["krayot"]
#12
⏱️ 15.54 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 18.62 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]