#1
⏱️ 127.99 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rehovot"]
#2
⏱️ 769.69 мс
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",1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390,true,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#3
⏱️ 695.97 мс
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",1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390,true,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#4
⏱️ 2.7 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 1.1 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 2.49 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4981873,4979747,4979741,4973497,4615325,4574975,4524453,4524307,4013398,4010322,4001201,3276113,3043797,2816262,2782222,2709647,2708626,2707089,2702790,2685471,2675929,2671430,2670760,2670268,2664339,2663976,2662458,2661254,2657025,2641224,2638261,2636108,2676233,2657391,2702341,true,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#7
⏱️ 3.74 мс
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:
[4981873,4979747,4979741,4973497,4615325,4574975,4524453,4524307,4013398,4010322,4001201,3276113,3043797,2816262,2782222,2709647,2708626,2707089,2702790,2685471,2675929,2671430,2670760,2670268,2664339,2663976,2662458,2661254,2657025,2641224,2638261,2636108,2676233,2657391,2702341,0,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#8
⏱️ 2.12 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2325216,11322520,11321181,31351576,2330533,2327917,2328035,2325230,2319728,2327999,18068818,2328037,2331177,2320287,2325477,2328022,2320077,2327989,11324953,68040842,3520947,3521038,24720477,37595523,7776803,7795635,7789173,11699067,3109522,3100377,2735523,2744326,2741382,3100381,3106651,3106657,3108802]
#9
⏱️ 1.5 мс
select * from "stores" where "stores"."id" in (455, 550, 597, 620, 768)
#10
⏱️ 8.09 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rehovot"]
#11
⏱️ 6.21 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 5.84 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]