#1
⏱️ 143.3 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"safed"]
#2
⏱️ 637.98 мс
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:
["snacks","chocolate_candy",101,275,true,101,275]
#3
⏱️ 366.14 мс
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:
["snacks","chocolate_candy",101,275,true,101,275]
#4
⏱️ 11.51 мс
select * from "canonical_products" where "canonical_products"."id" in (344)
#5
⏱️ 16.67 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[344]
#6
⏱️ 41.66 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[1962021,1942767,1922599,1910304,1910197,1909866,1909719,1461586,1461585,1461584,1461407,1461406,1461236,1461089,1461088,1458363,1458346,1458275,1458272,1458241,1458209,1457763,1457103,1456785,1456784,1456783,1456759,1456758,1456757,1455999,1455996,1455995,1461403,true,101,275]
#7
⏱️ 10.5 мс
select * from "stores" where "stores"."id" in (275)
#8
⏱️ 17.45 мс
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 = 1461403 THEN 1461407 WHEN sp.master_product_id = 1461407 THEN 1461407 ELSE sp.master_product_id END limit 500
Bindings:
[1962021,1942767,1922599,1910304,1910197,1909866,1909719,1461586,1461585,1461584,1461407,1461406,1461236,1461089,1461088,1458363,1458346,1458275,1458272,1458241,1458209,1457763,1457103,1456785,1456784,1456783,1456759,1456758,1456757,1455999,1455996,1455995,1461403,0,101,275]
#9
⏱️ 25.91 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5384277,5384278,5384281,5386072,5386073,5386074,5386093,5386094,5386095,5386234,5388223,5390020,5390039,5390069,5390072,25765957,5390155,5402669,5402717,5402718,5402859,5402860,5402861,5387972,5388117,5389988,5390142,5388224,27038631,5387973]
#10
⏱️ 6.53 мс
select * from "stores" where "stores"."id" in (275)
#11
⏱️ 10.68 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["safed"]
#12
⏱️ 13.26 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.41 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]