#1
⏱️ 123.75 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"hadera"]
#2
⏱️ 226.45 мс
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",738,469,155,342,true,738,469,155,342]
#3
⏱️ 99.9 мс
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",738,469,155,342,true,738,469,155,342]
#4
⏱️ 2.79 мс
select * from "canonical_products" where "canonical_products"."id" in (320)
#5
⏱️ 1.01 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[320]
#6
⏱️ 4.99 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[8775716,7065236,6745776,6730411,4987518,3739767,2674471,2671354,1462252,1462251,1462250,1457225,1453881,1452066,1425655,615729,452321,366432,193602,192680,169861,160711,156620,154703,151299,150988,149207,135279,135278,135189,134634,133990,4546240,true,738,469,155,342]
#7
⏱️ 3.08 мс
select * from "stores" where "stores"."id" in (342, 738)
#8
⏱️ 6.31 мс
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 = 4546240 THEN 192680 WHEN sp.master_product_id = 192680 THEN 192680 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7065236,6745776,6730411,4987518,3739767,2674471,2671354,1462252,1462251,1462250,1457225,1453881,1452066,1425655,615729,452321,366432,193602,192680,169861,160711,156620,154703,151299,150988,149207,135279,135278,135189,134634,133990,4546240,0,738,469,155,342]
#9
⏱️ 10.26 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[104921892,5430171,1843729,1835136,1843894,1843988,1843989,88639480,10355613,1833642,1842873,29223055,10345352,1837144,1841262,1841308,10349781,1836633,1842313,1836215,88641976,23956982,10344691,10345865,10344954,9568376,4025869,9558486,4025826,9558647,9558670,9558693,9603704,9593124]
#10
⏱️ 1.97 мс
select * from "stores" where "stores"."id" in (342, 469, 738)
#11
⏱️ 4.78 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["hadera"]
#12
⏱️ 1.74 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.38 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]