#1
⏱️ 107.98 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 689.74 мс
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","fruits",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,"produce"]
#3
⏱️ 343.75 мс
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","fruits",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,"produce"]
#4
⏱️ 5.94 мс
select * from "canonical_products" where "canonical_products"."id" in (11, 30, 78, 80, 182, 187, 238, 252)
#5
⏱️ 6.38 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[238,11,182,30,187,78,252,80]
#6
⏱️ 94.93 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8897354,7452710,7443230,7439517,3675179,2998448,2975219,2974530,2681942,2671011,2670954,2670949,2670946,2668399,2666943,2662799,2662570,2662130,2647242,2637097,2632033,2631970,2319509,2257916,2190661,2151263,2136438,2064239,2045870,1879673,1879660,1455743,809367,420472,1933366,98565,764101,95379,337070,1945358,2769595,123105,368474,374223,154873,2317173,127029,2629564,130085,3261507,2950238,2742300,101044,1453321,3015043,101043,97463,1907886,10941098,322317,1960939,2901961,3549846,150751,133528,156941,1452766,94867,102244,94974,109889,1879659,102185,101339,122806,122841,158420,124804,95010,101042,2639215,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#7
⏱️ 4.15 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363)
#8
⏱️ 57.38 мс
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 = 809367 THEN 3675179 WHEN sp.master_product_id = 420472 THEN 3675179 WHEN sp.master_product_id = 1933366 THEN 2670949 WHEN sp.master_product_id = 98565 THEN 3675179 WHEN sp.master_product_id = 764101 THEN 3675179 WHEN sp.master_product_id = 95379 THEN 3675179 WHEN sp.master_product_id = 2670949 THEN 2670949 WHEN sp.master_product_id = 337070 THEN 3675179 WHEN sp.master_product_id = 1945358 THEN 3675179 WHEN sp.master_product_id = 2769595 THEN 3675179 WHEN sp.master_product_id = 123105 THEN 3675179 WHEN sp.master_product_id = 2190661 THEN 2190661 WHEN sp.master_product_id = 2666943 THEN 2666943 WHEN sp.master_product_id = 368474 THEN 3675179 WHEN sp.master_product_id = 374223 THEN 3675179 WHEN sp.master_product_id = 154873 THEN 3675179 WHEN sp.master_product_id = 2317173 THEN 8897354 WHEN sp.master_product_id = 127029 THEN 3675179 WHEN sp.master_product_id = 2629564 THEN 3675179 WHEN sp.master_product_id = 130085 THEN 3675179 WHEN sp.master_product_id = 3675179 THEN 3675179 WHEN sp.master_product_id = 2647242 THEN 2647242 WHEN sp.master_product_id = 3261507 THEN 3675179 WHEN sp.master_product_id = 2950238 THEN 3675179 WHEN sp.master_product_id = 2742300 THEN 3675179 WHEN sp.master_product_id = 101044 THEN 3675179 WHEN sp.master_product_id = 1453321 THEN 2647242 WHEN sp.master_product_id = 3015043 THEN 3675179 WHEN sp.master_product_id = 8897354 THEN 8897354 WHEN sp.master_product_id = 101043 THEN 3675179 WHEN sp.master_product_id = 97463 THEN 3675179 WHEN sp.master_product_id = 1907886 THEN 3675179 WHEN sp.master_product_id = 10941098 THEN 2666943 WHEN sp.master_product_id = 322317 THEN 3675179 WHEN sp.master_product_id = 1960939 THEN 2681942 WHEN sp.master_product_id = 2901961 THEN 3675179 WHEN sp.master_product_id = 3549846 THEN 3675179 WHEN sp.master_product_id = 2681942 THEN 2681942 WHEN sp.master_product_id = 150751 THEN 2637097 WHEN sp.master_product_id = 133528 THEN 2637097 WHEN sp.master_product_id = 156941 THEN 2647242 WHEN sp.master_product_id = 1452766 THEN 2637097 WHEN sp.master_product_id = 94867 THEN 3675179 WHEN sp.master_product_id = 102244 THEN 3675179 WHEN sp.master_product_id = 94974 THEN 3675179 WHEN sp.master_product_id = 109889 THEN 2190661 WHEN sp.master_product_id = 1879659 THEN 2637097 WHEN sp.master_product_id = 102185 THEN 3675179 WHEN sp.master_product_id = 101339 THEN 3675179 WHEN sp.master_product_id = 122806 THEN 3675179 WHEN sp.master_product_id = 122841 THEN 3675179 WHEN sp.master_product_id = 158420 THEN 2647242 WHEN sp.master_product_id = 124804 THEN 3675179 WHEN sp.master_product_id = 95010 THEN 3675179 WHEN sp.master_product_id = 101042 THEN 3675179 WHEN sp.master_product_id = 2637097 THEN 2637097 WHEN sp.master_product_id = 2639215 THEN 3675179 ELSE sp.master_product_id END limit 500
Bindings:
[8897354,7452710,7443230,7439517,3675179,2998448,2975219,2974530,2681942,2671011,2670954,2670949,2670946,2668399,2666943,2662799,2662570,2662130,2647242,2637097,2632033,2631970,2319509,2257916,2190661,2151263,2136438,2064239,2045870,1879673,1879660,1455743,809367,420472,1933366,98565,764101,95379,337070,1945358,2769595,123105,368474,374223,154873,2317173,127029,2629564,130085,3261507,2950238,2742300,101044,1453321,3015043,101043,97463,1907886,10941098,322317,1960939,2901961,3549846,150751,133528,156941,1452766,94867,102244,94974,109889,1879659,102185,101339,122806,122841,158420,124804,95010,101042,2639215,0,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#9
⏱️ 24.44 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[66395808,5965241,45806392,21247013,70688575,819027,6333847,80274626,6331580,71027006,5028799,46145076,46147613,80149566,71026962,71032687,860590,6130588,6130575,6130587,6128149,6146291,2524728,2524743,2524718,30229689,2524760,2524763,31682486,2524780,12064576,2523513,12069538,2526841,10311885,1802031,1802054,1802019,1802067,1799621,1800224,1801547,1802457,1802076,1802465,10315657,1802472,1802701,23915811,29177661,522038]
#10
⏱️ 1.76 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363, 481, 755, 767)
#11
⏱️ 1.12 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"eilat"]
#12
⏱️ 136.42 мс
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:
[1112,755,767,777,1143,1182,1196,1264,481,1379,123,180,237,252,363,true,"2026-10-22T19:39:19.843120Z"]
#13
⏱️ 1.43 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#14
⏱️ 1.25 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 1.86 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]