#1
⏱️ 37.25 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"tiberias"]
#2
⏱️ 970.46 мс
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","sauces_oils",756,633,true,756,633]
#3
⏱️ 88.88 мс
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","sauces_oils",756,633,true,756,633]
#4
⏱️ 1.86 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 1.18 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 1.46 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[75165094,66413048,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,3931378,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1458529,1458528,1458526,1456529,1456311,1429562,1424653,785096,287759,98914,true,756,633]
#7
⏱️ 2.23 мс
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 = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,66413048,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,3931378,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1458529,1458528,1458526,1456529,1456311,1429562,1424653,785096,287759,98914,0,756,633]
#8
⏱️ 10.65 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12282345,2962819,11572348,12286148,12279495,2962466,12282421,12279569,12274746,12275771,12276737,12281328,12281329,12281677,12281886,12283322,12283434,12288155,72837451,10326722,67466833,67463793,1807525,10325019,1808025,1806040,1818385,1815437,1817327,1814997,32970719,10316230,29205309,67477907]
#9
⏱️ 1.76 мс
select * from "stores" where "stores"."id" in (633, 756)
#10
⏱️ 1.9 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["tiberias"]
#11
⏱️ 1.71 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 2.33 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]