#1
⏱️ 112.57 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"karmiel"]
#2
⏱️ 368.25 мс
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:
["appliances","kitchen_appliances",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#3
⏱️ 225.11 мс
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:
["appliances","kitchen_appliances",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#4
⏱️ 5.97 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 8.13 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 19.88 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4013398,4010322,2816262,2782222,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2661254,2657025,2641224,2638261,2636108,1433572,179447,166724,160865,157962,156053,135093,133071,101406,105059205,2657391,2702341,true,186,743,119,1241,545,1325,98,450,684,29,398]
#7
⏱️ 11.24 мс
select * from "stores" where "stores"."id" in (29, 98, 119, 186, 398)
#8
⏱️ 22.05 мс
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 = 2676233 THEN 2657025 WHEN sp.master_product_id = 2657391 THEN 2657025 WHEN sp.master_product_id = 2657025 THEN 2657025 WHEN sp.master_product_id = 2702341 THEN 2657025 ELSE sp.master_product_id END limit 500
Bindings:
[4013398,4010322,2816262,2782222,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2661254,2657025,2641224,2638261,2636108,1433572,179447,166724,160865,157962,156053,135093,133071,101406,105059205,2657391,2702341,0,186,743,119,1241,545,1325,98,450,684,29,398]
#9
⏱️ 39.62 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5733038,4434915,6449443,4631920,4643297,1413515,1408812,31295997,2270355,11130424,2266845,2268258,11111755,11145735,11144125,31292255,2274584,2274182,29691126,2266879,2275393,31300899,11152037,11125243,11133034,11146783,11120594,2279225,71791307,24427269,3368977,3364553,3366544,3369611,3375949,77875077,3370064,3376053]
#10
⏱️ 6.54 мс
select * from "stores" where "stores"."id" in (29, 98, 119, 186, 398, 450, 545)
#11
⏱️ 6.35 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["karmiel"]
#12
⏱️ 8.56 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 7.76 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]