#1
⏱️ 149.05 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramla"]
#2
⏱️ 332.82 мс
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
⏱️ 201.86 мс
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
⏱️ 3.62 мс
select * from "canonical_products" where "canonical_products"."id" in (196, 224)
#5
⏱️ 8.64 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[224,196]
#6
⏱️ 16.66 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[32975885,32975875,32975867,32975846,8775798,8775778,5127697,3927220,3854696,3854695,3711116,3253804,2671000,2670972,2667237,2641893,1910802,1456789,1456787,1451712,1451696,1451626,1451473,362443,208252,208251,207716,197740,193506,189941,189940,182094,3702666,1453483,true,462,470,521]
#7
⏱️ 8.82 мс
select * from "stores" where "stores"."id" in (521)
#8
⏱️ 23.08 мс
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 = 3702666 THEN 2667237 WHEN sp.master_product_id = 2667237 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:
[32975885,32975875,32975867,32975846,8775798,8775778,5127697,3927220,3854696,3854695,3711116,3253804,2671000,2670972,2667237,2641893,1910802,1456789,1456787,1451712,1451696,1451626,1451473,362443,208252,208251,207716,197740,193506,189941,189940,182094,3702666,1453483,0,462,470,521]
#9
⏱️ 30.39 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[13925932,29966339,2409136,2409071,11551718,11552260,68212188,68211131,29981066,68211186,68209782,68209879,11553936,11553964,13962368,29972023,11587583,33660896,33660961,31537086,11814761,11814696,2476654,2476609,33683197,31531441,31533773,31533779,31534043,30138437,30138597,30139962,31539070,31539071,2474758,33658190,33658724,33658748,33658878,9603160,73966,9604471,9613280]
#10
⏱️ 10.07 мс
select * from "stores" where "stores"."id" in (462, 470, 521)
#11
⏱️ 3.54 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramla"]
#12
⏱️ 4.94 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 4.9 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]