#1
⏱️ 209.75 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beer-sheva"]
#2
⏱️ 1383.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:
["grocery","canned_preserves",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
⏱️ 1063.63 мс
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","canned_preserves",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
⏱️ 14.9 мс
select * from "canonical_products" where "canonical_products"."id" in (8, 38)
#5
⏱️ 14.3 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[8,38]
#6
⏱️ 928.15 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7499337,7455589,7455588,7065236,6745776,6730411,4987518,4536333,3739767,3646497,3041110,2864978,2717082,2717075,2717021,2701771,2681555,2674471,2671354,2659225,2645643,2568011,2564911,2564288,2564194,2562948,2562424,2562299,2562034,2561923,2561847,3170808,1462716,123050,160427,2812826,2672969,2672977,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
⏱️ 12.86 мс
select * from "stores" where "stores"."id" in (93, 113, 120, 132, 172, 369, 736)
#8
⏱️ 35.28 мс
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 = 3170808 THEN 3041110 WHEN sp.master_product_id = 1462716 THEN 3041110 WHEN sp.master_product_id = 123050 THEN 3041110 WHEN sp.master_product_id = 3041110 THEN 3041110 WHEN sp.master_product_id = 160427 THEN 3041110 WHEN sp.master_product_id = 2812826 THEN 3041110 WHEN sp.master_product_id = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7499337,7455589,7455588,7065236,6745776,6730411,4987518,4536333,3739767,3646497,3041110,2864978,2717082,2717075,2717021,2701771,2681555,2674471,2671354,2659225,2645643,2568011,2564911,2564288,2564194,2562948,2562424,2562299,2562034,2561923,2561847,3170808,1462716,123050,160427,2812826,2672969,2672977,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
⏱️ 72.61 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[68729129,68386986,68230112,67902976,4908776,4911066,4911237,4911729,4913561,4916572,4922423,4923469,4905856,4922195,78882897,31202743,2167895,2170853,10839883,2168483,77805102,10830488,10830567,33319003,2167090,31200769,10829601,10830987,2170148,30046416,2444621,2441861,31479577,31477256,31477528,31477585,2437524,56450640,11684573,30044521,11665599,11929725,11921012,11908684,11911698,11913211,11911937,30282395,12135286,83387873,2547743,47676577,12139506,35824199,12139822,12140550,12140551,2548075,9603702,9593122,32950591,1777075,1790645,1976501,32952598,1789887,1779149,29169602,23899976]
#10
⏱️ 23.5 мс
select * from "stores" where "stores"."id" in (93, 113, 120, 132, 172, 369, 441, 465, 473, 490, 736, 754)
#11
⏱️ 16.18 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beer-sheva"]
#12
⏱️ 22.74 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 23.16 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]