#1
⏱️ 44.37 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-gat"]
#2
⏱️ 290.6 мс
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","canned_preserves",471,90,243,true,471,90,243]
#3
⏱️ 69.65 мс
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","canned_preserves",471,90,243,true,471,90,243]
#4
⏱️ 1.31 мс
select * from "canonical_products" where "canonical_products"."id" in (8, 38, 320)
#5
⏱️ 0.67 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?)
Bindings:
[8,38,320]
#6
⏱️ 3.78 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[7065236,6745776,6730411,3041110,2681555,2671354,2659225,2645643,1918287,1912286,1912018,1911972,1910474,1909366,1908153,1459891,1458610,1453960,1453881,1451883,1451783,1451765,615729,452321,366432,193602,192680,156620,154703,151299,150988,135279,1462716,3170808,123050,160427,2812826,2672969,2672977,4546240,true,471,90,243]
#7
⏱️ 1.01 мс
select * from "stores" where "stores"."id" in (90)
#8
⏱️ 2.06 мс
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 = 1462716 THEN 3041110 WHEN sp.master_product_id = 3170808 THEN 3041110 WHEN sp.master_product_id = 123050 THEN 3041110 WHEN sp.master_product_id = 3041110 THEN 3041110 WHEN sp.master_product_id = 160427 THEN 3041110 WHEN sp.master_product_id = 2812826 THEN 3041110 WHEN sp.master_product_id = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 WHEN sp.master_product_id = 4546240 THEN 192680 WHEN sp.master_product_id = 192680 THEN 192680 ELSE sp.master_product_id END limit 500
Bindings:
[7065236,6745776,6730411,3041110,2681555,2671354,2659225,2645643,1918287,1912286,1912018,1911972,1910474,1909366,1908153,1459891,1458610,1453960,1453881,1451883,1451783,1451765,615729,452321,366432,193602,192680,156620,154703,151299,150988,135279,1462716,3170808,123050,160427,2812826,2672969,2672977,4546240,0,471,90,243]
#9
⏱️ 9.58 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4817611,4814084,4814085,4820379,4823667,4832227,4832265,4832441,4832130,2477219,33698603,33692571,33708155,33703863,33697814,11869506,33698954,33700822,68365008,11845755,11853851,18562919,11843788,11859792,33700994,11848806,33703561,33696710,31551987,2477932,11876877,11847228,11877003]
#10
⏱️ 2.04 мс
select * from "stores" where "stores"."id" in (90, 471)
#11
⏱️ 2.45 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-gat"]
#12
⏱️ 1.42 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.69 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]