#1
⏱️ 140.37 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"karmiel"]
#2
⏱️ 1166.77 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#3
⏱️ 665.48 мс
select * from "master_products" where "barcode" is not null and "category_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",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#4
⏱️ 13.64 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 8.57 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 32.9 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775816,8775815,8775810,8775804,8775803,8775802,8775801,8775755,4013398,4010322,4001201,3987313,3983288,3585819,3043797,2816262,2782222,2709647,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2661254,2657391,2657025,2702341,true,186,743,119,1241,545,1325,98,450,684,29,398]
#7
⏱️ 9.42 мс
select * from "stores" where "stores"."id" in (743)
#8
⏱️ 32.06 мс
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 2676233 WHEN sp.master_product_id = 2657391 THEN 2676233 WHEN sp.master_product_id = 2657025 THEN 2676233 WHEN sp.master_product_id = 2702341 THEN 2676233 ELSE sp.master_product_id END limit 500
Bindings:
[8775816,8775815,8775810,8775804,8775803,8775802,8775801,8775755,4013398,4010322,4001201,3987313,3983288,3585819,3043797,2816262,2782222,2709647,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2661254,2657391,2657025,2702341,0,186,743,119,1241,545,1325,98,450,684,29,398]
#9
⏱️ 37.32 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[11145735,11144125,31292255,2274584,2274182,29691126,2266879,2275393,31300899,11111755,11152037,11125243,11133034,11146783,11123914,11120594,2279225,11124971,33428725,77884410,3358042,3375426,3370064,3376053,4026476,4027637,4027680,4027723,4027766,4027938,4028024,4028067]
#10
⏱️ 9.36 мс
select * from "stores" where "stores"."id" in (450, 545, 743)
#11
⏱️ 3.36 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["karmiel"]
#12
⏱️ 17.33 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.22 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]