#1
⏱️ 150.69 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 656.07 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) and master_products.id IN (
SELECT DISTINCT ON (COALESCE(canonical_product_id, -id)) id
FROM master_products
WHERE category_slug = ?
ORDER BY COALESCE(canonical_product_id, -id),
CASE WHEN image_url IS NOT NULL AND image_url != '' THEN 0 ELSE 1 END,
id DESC
)
Bindings:
["produce","vegetables",1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223,true,1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223,"produce"]
#3
⏱️ 341.26 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) and master_products.id IN (
SELECT DISTINCT ON (COALESCE(canonical_product_id, -id)) id
FROM master_products
WHERE category_slug = ?
ORDER BY COALESCE(canonical_product_id, -id),
CASE WHEN image_url IS NOT NULL AND image_url != '' THEN 0 ELSE 1 END,
id DESC
) 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:
["produce","vegetables",1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223,true,1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223,"produce"]
#4
⏱️ 13.04 мс
select * from "canonical_products" where "canonical_products"."id" in (7, 47, 48, 105, 254, 277)
#5
⏱️ 6.84 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[7,48,105,277,47,254]
#6
⏱️ 95.39 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[7446739,7431628,6571261,4302537,4012164,3915123,3713449,3282713,3277386,3065978,3063886,2903796,2896664,2842852,2702255,2685471,2676139,2674471,2673219,2671354,2671017,2670978,2670972,2664339,2663549,2662892,2661254,2660155,2658241,2657764,2645643,2642320,864799,406907,95617,199262,133465,109100,170223,135114,133500,194993,1959667,154945,109696,193908,1456443,246685,95630,109897,100698,97366,111087,164587,149383,2660394,true,1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223]
#7
⏱️ 7.92 мс
select * from "stores" where "stores"."id" in (4, 14, 16, 32, 73, 118)
#8
⏱️ 59.96 мс
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 = 864799 THEN 3713449 WHEN sp.master_product_id = 3713449 THEN 3713449 WHEN sp.master_product_id = 406907 THEN 3713449 WHEN sp.master_product_id = 95617 THEN 3713449 WHEN sp.master_product_id = 199262 THEN 3713449 WHEN sp.master_product_id = 133465 THEN 3713449 WHEN sp.master_product_id = 109100 THEN 3713449 WHEN sp.master_product_id = 170223 THEN 3713449 WHEN sp.master_product_id = 2673219 THEN 2673219 WHEN sp.master_product_id = 135114 THEN 2673219 WHEN sp.master_product_id = 133500 THEN 2903796 WHEN sp.master_product_id = 2903796 THEN 2903796 WHEN sp.master_product_id = 194993 THEN 2903796 WHEN sp.master_product_id = 1959667 THEN 2903796 WHEN sp.master_product_id = 154945 THEN 2903796 WHEN sp.master_product_id = 109696 THEN 2903796 WHEN sp.master_product_id = 193908 THEN 2903796 WHEN sp.master_product_id = 1456443 THEN 2896664 WHEN sp.master_product_id = 246685 THEN 2896664 WHEN sp.master_product_id = 2896664 THEN 2896664 WHEN sp.master_product_id = 95630 THEN 2896664 WHEN sp.master_product_id = 109897 THEN 2896664 WHEN sp.master_product_id = 100698 THEN 2896664 WHEN sp.master_product_id = 97366 THEN 2896664 WHEN sp.master_product_id = 111087 THEN 2896664 WHEN sp.master_product_id = 164587 THEN 2896664 WHEN sp.master_product_id = 149383 THEN 2662892 WHEN sp.master_product_id = 2662892 THEN 2662892 WHEN sp.master_product_id = 2660394 THEN 2676139 WHEN sp.master_product_id = 2676139 THEN 2676139 ELSE sp.master_product_id END limit 500
Bindings:
[7446739,7431628,6571261,4302537,4012164,3915123,3713449,3282713,3277386,3065978,3063886,2903796,2896664,2842852,2702255,2685471,2676139,2674471,2673219,2671354,2671017,2670978,2670972,2664339,2663549,2662892,2661254,2660155,2658241,2657764,2645643,2642320,864799,406907,95617,199262,133465,109100,170223,135114,133500,194993,1959667,154945,109696,193908,1456443,246685,95630,109897,100698,97366,111087,164587,149383,2660394,0,1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223]
#9
⏱️ 47.6 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1545977,1545963,1596645,1596634,6116098,1613367,1619999,5603174,5603161,459843,459830,6459191,6459177,2035437,2041862,2038580,2039642,2036848,2029169,2041689,2039467,2034379,2029491,2315998,2308782,2316193,2308508,2309507,2310890,2314471,2314479,2314515,2302800,2308246,2303940,2316837,2315278,2302733,2313761,2304744,2310287,2304715,2355972,2362846,2364074,2363562,2358697,2356539,2357785,2356471,2554544,2555322,2558621,2556858,2556353,2556324,2558502,2554346,2557246,2559244,2560890,2563819,2562436,2562011,2562069,2561982,2559514,2559164,2562475,3627130,3624664,3628632,3626083]
#10
⏱️ 5.87 мс
select * from "stores" where "stores"."id" in (4, 14, 16, 32, 73, 118, 431, 454, 458, 492, 493, 567)
#11
⏱️ 8.27 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"givatayim"]
#12
⏱️ 99.68 мс
select store_id, count(*) as total from "deals" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and ("expires_at" is null or "expires_at" >= ?) group by "store_id"
Bindings:
[1118,1181,1221,1290,16,14,38,118,261,212,226,231,292,431,454,458,492,493,567,663,672,683,687,32,73,4,223,true,"2026-09-08T06:22:24.333112Z"]
#13
⏱️ 14.56 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#14
⏱️ 16.31 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 16.4 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]