#1
⏱️ 59.64 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"tiberias"]
#2
⏱️ 1293.67 мс
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
⏱️ 407.19 мс
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
⏱️ 8.99 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 8.13 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 13.91 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[129895076,129892744,75165094,66413048,4991028,4988931,4988808,4988696,4987860,4987789,4987622,4987621,4986261,4985212,4984746,4984221,3931378,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1458529,1458528,1458526,1456529,1456311,98914,true,756,633]
#7
⏱️ 10.14 мс
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 = 1458529 THEN 1458529 WHEN sp.master_product_id = 98914 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[129895076,129892744,75165094,66413048,4991028,4988931,4988808,4988696,4987860,4987789,4987622,4987621,4986261,4985212,4984746,4984221,3931378,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1458529,1458528,1458526,1456529,1456311,98914,0,756,633]
#8
⏱️ 22.03 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12279495,2962466,12282421,12279569,12274746,12275771,12276737,12278386,12281328,12281329,12281677,12281886,12283322,12283434,12283557,12288155,72837451,97259540,97262705,10326722,67466833,67463793,1807525,10325019,1808025,1806040,1818385,1815437,1817327,1814997,32970719,10316230,29205309,67477907]
#9
⏱️ 4.76 мс
select * from "stores" where "stores"."id" in (633, 756)
#10
⏱️ 12.97 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["tiberias"]
#11
⏱️ 10.29 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 8.88 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]