#1
⏱️ 163.47 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramla"]
#2
⏱️ 519.87 мс
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","chips_savory",462,470,521,true,462,470,521]
#3
⏱️ 186.98 мс
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","chips_savory",462,470,521,true,462,470,521]
#4
⏱️ 15.17 мс
select * from "canonical_products" where "canonical_products"."id" in (196, 224)
#5
⏱️ 6.46 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[224,196]
#6
⏱️ 15.31 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[108808721,108787969,32975885,32975875,32975867,32975846,8775798,8775778,5127697,3927220,3854696,3854695,3711116,3253804,2896439,2671000,2670972,2667237,2641893,1910802,1456789,1456787,1451712,1451696,1451626,1451473,362443,209586,208252,208251,207716,197740,3702666,1453483,true,462,470,521]
#7
⏱️ 4.56 мс
select * from "stores" where "stores"."id" in (521)
#8
⏱️ 16.43 мс
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 = 2667237 THEN 2667237 WHEN sp.master_product_id = 3702666 THEN 2667237 WHEN sp.master_product_id = 1453483 THEN 3711116 WHEN sp.master_product_id = 3711116 THEN 3711116 ELSE sp.master_product_id END limit 500
Bindings:
[108808721,108787969,32975885,32975875,32975867,32975846,8775798,8775778,5127697,3927220,3854696,3854695,3711116,3253804,2896439,2671000,2670972,2667237,2641893,1910802,1456789,1456787,1451712,1451696,1451626,1451473,362443,209586,208252,208251,207716,197740,3702666,1453483,0,462,470,521]
#9
⏱️ 27.1 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2409136,2409071,11551718,11552260,89476141,68212188,68211131,29981066,68211186,68209782,68209879,92149410,11553936,11553964,13962368,29972023,11587583,82939042,78276568,11814761,11814696,2476654,2476609,33683197,31531441,31533773,31533779,31534043,30138437,30138597,92301464,30139962,89792071,31539070,31539071,2474758,33658190,33658724,33658748,33658878,78432886,89797845,9603160,73966,9604471,9613280]
#10
⏱️ 8.2 мс
select * from "stores" where "stores"."id" in (462, 470, 521)
#11
⏱️ 12.81 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramla"]
#12
⏱️ 9.07 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 10.36 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]