#1
⏱️ 175.48 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beer-sheva"]
#2
⏱️ 3464.09 мс
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:
["household","cleaning_paper",93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369,true,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#3
⏱️ 951.69 мс
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:
["household","cleaning_paper",93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369,true,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#4
⏱️ 2.62 мс
select * from "canonical_products" where "canonical_products"."id" in (12, 25, 38)
#5
⏱️ 0.97 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?)
Bindings:
[12,25,38]
#6
⏱️ 14.45 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[24332368,10880869,8775654,7473385,4649624,4531886,3411661,3340041,2987725,2987724,2822644,2807242,2798322,2742043,2715904,2702341,2672991,2672977,2672969,2663179,2657391,2634735,2633336,2613163,2563224,2563223,2413856,2413855,2178279,2049531,1911330,1879230,2956794,2676233,2657025,2681555,true,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#7
⏱️ 3.38 мс
select * from "stores" where "stores"."id" in (93, 113, 120, 132, 151, 172, 181, 246, 350, 369, 736, 776, 1169, 1170, 1206, 1249, 1271, 1274, 1279, 1299, 1307, 1370, 1400)
#8
⏱️ 9.82 мс
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 = 2956794 THEN 3411661 WHEN sp.master_product_id = 3411661 THEN 3411661 WHEN sp.master_product_id = 2676233 THEN 2657391 WHEN sp.master_product_id = 2657391 THEN 2657391 WHEN sp.master_product_id = 2657025 THEN 2657391 WHEN sp.master_product_id = 2702341 THEN 2657391 WHEN sp.master_product_id = 2681555 THEN 2672969 WHEN sp.master_product_id = 2672969 THEN 2672969 WHEN sp.master_product_id = 2672977 THEN 2672969 ELSE sp.master_product_id END limit 500
Bindings:
[24332368,10880869,8775654,7473385,4649624,4531886,3411661,3340041,2987725,2987724,2822644,2807242,2798322,2742043,2715904,2702341,2672991,2672977,2672969,2663179,2657391,2634735,2633336,2613163,2563224,2563223,2413856,2413855,2178279,2049531,1911330,1879230,2956794,2676233,2657025,2681555,0,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#9
⏱️ 17.44 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[76696710,13929201,13169307,13169809,13169810,63003612,4916846,4916847,2170089,2179092,2167584,2168483,2171804,10830438,2167044,31197487,11680628,2442089,2437665,2443187,31479577,31479934,33604633,11673154,31481205,2437476,68264882,33724830,2491326,11908831,11925343,2491344,11907633,11908640,30285836,12135286,2549313,47677820,4025136,9603564,9570237,9581346,9798195,1779440,32952889,1790153,1777800,10291068,1782514,29171525]
#10
⏱️ 1.49 мс
select * from "stores" where "stores"."id" in (93, 132, 172, 441, 465, 473, 490, 736, 754)
#11
⏱️ 1.33 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beer-sheva"]
#12
⏱️ 1.08 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.28 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]