#1
⏱️ 174.7 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#2
⏱️ 573.27 мс
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",1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83,true,1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83,"produce"]
#3
⏱️ 333.53 мс
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",1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83,true,1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83,"produce"]
#4
⏱️ 11.79 мс
select * from "canonical_products" where "canonical_products"."id" in (3, 11, 12, 182, 221, 241, 270)
#5
⏱️ 12.3 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?)
Bindings:
[3,241,11,12,221,270,182]
#6
⏱️ 1076.18 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775869,7471450,7463215,7443254,7439517,7252747,5130723,5127697,4988681,4986884,4054218,4054217,3804990,3779870,3675179,3411661,3242406,3149860,3087552,2998448,2996801,2996211,2974530,2797107,2750558,2748827,2715904,2682071,2681942,2680174,2677371,2671353,8775857,8775862,8775826,8775829,8775830,8775837,8775838,8775841,8775842,8775845,8775843,8775844,8775847,8775846,8775848,8775850,8775851,8775859,8775861,8775867,8775868,2645047,7696015,8775839,8775856,8775858,8775860,8775863,8775864,199939,4869230,4619338,8775832,8775833,8775836,8775865,8775825,8775828,4533490,189745,8775840,8775849,8775853,8775855,8775866,2642425,2671007,8775827,8775831,8775834,8775835,8775852,8775854,190787,809367,420472,3015043,95010,764101,3549846,337070,1945358,124804,2769595,101043,2901961,368474,374223,2950238,122806,95379,2742300,2629564,3261507,1907886,2639215,101044,322317,127029,154873,123105,122841,102185,102244,130085,94867,94974,97463,98565,101042,101339,2956794,1960939,3045691,1907930,150734,133480,162583,2665490,170265,150737,154350,true,1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83]
#7
⏱️ 13.32 мс
select * from "stores" where "stores"."id" in (6, 69, 85, 87, 106, 109, 114, 143, 149, 274, 278, 279, 281, 286, 306, 315, 320, 332, 535, 700, 727, 728, 746)
#8
⏱️ 1129.68 мс
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 = 8775857 THEN 8775869 WHEN sp.master_product_id = 8775862 THEN 8775869 WHEN sp.master_product_id = 8775826 THEN 8775869 WHEN sp.master_product_id = 8775829 THEN 8775869 WHEN sp.master_product_id = 8775830 THEN 8775869 WHEN sp.master_product_id = 8775837 THEN 8775869 WHEN sp.master_product_id = 8775838 THEN 8775869 WHEN sp.master_product_id = 8775841 THEN 8775869 WHEN sp.master_product_id = 8775842 THEN 8775869 WHEN sp.master_product_id = 8775845 THEN 8775869 WHEN sp.master_product_id = 8775843 THEN 8775869 WHEN sp.master_product_id = 8775844 THEN 8775869 WHEN sp.master_product_id = 8775847 THEN 8775869 WHEN sp.master_product_id = 8775846 THEN 8775869 WHEN sp.master_product_id = 8775848 THEN 8775869 WHEN sp.master_product_id = 8775850 THEN 8775869 WHEN sp.master_product_id = 8775851 THEN 8775869 WHEN sp.master_product_id = 8775859 THEN 8775869 WHEN sp.master_product_id = 8775861 THEN 8775869 WHEN sp.master_product_id = 8775867 THEN 8775869 WHEN sp.master_product_id = 8775868 THEN 8775869 WHEN sp.master_product_id = 2645047 THEN 8775869 WHEN sp.master_product_id = 7696015 THEN 8775869 WHEN sp.master_product_id = 8775839 THEN 8775869 WHEN sp.master_product_id = 8775856 THEN 8775869 WHEN sp.master_product_id = 8775858 THEN 8775869 WHEN sp.master_product_id = 8775860 THEN 8775869 WHEN sp.master_product_id = 8775863 THEN 8775869 WHEN sp.master_product_id = 8775864 THEN 8775869 WHEN sp.master_product_id = 199939 THEN 8775869 WHEN sp.master_product_id = 4869230 THEN 8775869 WHEN sp.master_product_id = 4619338 THEN 8775869 WHEN sp.master_product_id = 8775832 THEN 8775869 WHEN sp.master_product_id = 8775833 THEN 8775869 WHEN sp.master_product_id = 8775836 THEN 8775869 WHEN sp.master_product_id = 8775865 THEN 8775869 WHEN sp.master_product_id = 8775825 THEN 8775869 WHEN sp.master_product_id = 8775828 THEN 8775869 WHEN sp.master_product_id = 4533490 THEN 8775869 WHEN sp.master_product_id = 189745 THEN 8775869 WHEN sp.master_product_id = 8775840 THEN 8775869 WHEN sp.master_product_id = 8775849 THEN 8775869 WHEN sp.master_product_id = 8775853 THEN 8775869 WHEN sp.master_product_id = 8775855 THEN 8775869 WHEN sp.master_product_id = 8775866 THEN 8775869 WHEN sp.master_product_id = 2642425 THEN 8775869 WHEN sp.master_product_id = 2671007 THEN 8775869 WHEN sp.master_product_id = 8775827 THEN 8775869 WHEN sp.master_product_id = 8775831 THEN 8775869 WHEN sp.master_product_id = 8775834 THEN 8775869 WHEN sp.master_product_id = 8775835 THEN 8775869 WHEN sp.master_product_id = 8775852 THEN 8775869 WHEN sp.master_product_id = 8775854 THEN 8775869 WHEN sp.master_product_id = 8775869 THEN 8775869 WHEN sp.master_product_id = 190787 THEN 8775869 WHEN sp.master_product_id = 809367 THEN 3675179 WHEN sp.master_product_id = 420472 THEN 3675179 WHEN sp.master_product_id = 3015043 THEN 3675179 WHEN sp.master_product_id = 95010 THEN 3675179 WHEN sp.master_product_id = 764101 THEN 3675179 WHEN sp.master_product_id = 3549846 THEN 3675179 WHEN sp.master_product_id = 337070 THEN 3675179 WHEN sp.master_product_id = 1945358 THEN 3675179 WHEN sp.master_product_id = 124804 THEN 3675179 WHEN sp.master_product_id = 2769595 THEN 3675179 WHEN sp.master_product_id = 101043 THEN 3675179 WHEN sp.master_product_id = 2901961 THEN 3675179 WHEN sp.master_product_id = 3675179 THEN 3675179 WHEN sp.master_product_id = 368474 THEN 3675179 WHEN sp.master_product_id = 374223 THEN 3675179 WHEN sp.master_product_id = 2950238 THEN 3675179 WHEN sp.master_product_id = 122806 THEN 3675179 WHEN sp.master_product_id = 95379 THEN 3675179 WHEN sp.master_product_id = 2742300 THEN 3675179 WHEN sp.master_product_id = 2629564 THEN 3675179 WHEN sp.master_product_id = 3261507 THEN 3675179 WHEN sp.master_product_id = 1907886 THEN 3675179 WHEN sp.master_product_id = 2639215 THEN 3675179 WHEN sp.master_product_id = 101044 THEN 3675179 WHEN sp.master_product_id = 322317 THEN 3675179 WHEN sp.master_product_id = 127029 THEN 3675179 WHEN sp.master_product_id = 154873 THEN 3675179 WHEN sp.master_product_id = 123105 THEN 3675179 WHEN sp.master_product_id = 122841 THEN 3675179 WHEN sp.master_product_id = 102185 THEN 3675179 WHEN sp.master_product_id = 102244 THEN 3675179 WHEN sp.master_product_id = 130085 THEN 3675179 WHEN sp.master_product_id = 94867 THEN 3675179 WHEN sp.master_product_id = 94974 THEN 3675179 WHEN sp.master_product_id = 97463 THEN 3675179 WHEN sp.master_product_id = 98565 THEN 3675179 WHEN sp.master_product_id = 101042 THEN 3675179 WHEN sp.master_product_id = 101339 THEN 3675179 WHEN sp.master_product_id = 2956794 THEN 3411661 WHEN sp.master_product_id = 3411661 THEN 3411661 WHEN sp.master_product_id = 2681942 THEN 2681942 WHEN sp.master_product_id = 1960939 THEN 2681942 WHEN sp.master_product_id = 3045691 THEN 3242406 WHEN sp.master_product_id = 3242406 THEN 3242406 WHEN sp.master_product_id = 5130723 THEN 5130723 WHEN sp.master_product_id = 1907930 THEN 5130723 WHEN sp.master_product_id = 150734 THEN 5130723 WHEN sp.master_product_id = 133480 THEN 5130723 WHEN sp.master_product_id = 162583 THEN 3149860 WHEN sp.master_product_id = 3149860 THEN 3149860 WHEN sp.master_product_id = 2665490 THEN 3149860 WHEN sp.master_product_id = 170265 THEN 3149860 WHEN sp.master_product_id = 150737 THEN 3149860 WHEN sp.master_product_id = 154350 THEN 3149860 ELSE sp.master_product_id END limit 500
Bindings:
[8775869,7471450,7463215,7443254,7439517,7252747,5130723,5127697,4988681,4986884,4054218,4054217,3804990,3779870,3675179,3411661,3242406,3149860,3087552,2998448,2996801,2996211,2974530,2797107,2750558,2748827,2715904,2682071,2681942,2680174,2677371,2671353,8775857,8775862,8775826,8775829,8775830,8775837,8775838,8775841,8775842,8775845,8775843,8775844,8775847,8775846,8775848,8775850,8775851,8775859,8775861,8775867,8775868,2645047,7696015,8775839,8775856,8775858,8775860,8775863,8775864,199939,4869230,4619338,8775832,8775833,8775836,8775865,8775825,8775828,4533490,189745,8775840,8775849,8775853,8775855,8775866,2642425,2671007,8775827,8775831,8775834,8775835,8775852,8775854,190787,809367,420472,3015043,95010,764101,3549846,337070,1945358,124804,2769595,101043,2901961,368474,374223,2950238,122806,95379,2742300,2629564,3261507,1907886,2639215,101044,322317,127029,154873,123105,122841,102185,102244,130085,94867,94974,97463,98565,101042,101339,2956794,1960939,3045691,1907930,150734,133480,162583,2665490,170265,150737,154350,0,1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83]
#9
⏱️ 54.35 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1561296,4125424,4737213,4692653,6503228,6546793,6522140,5461876,4971373,554616,631805,5410139,5410183,5717060,5683577,5683623,5616037,5450415,655425,5445360,5529708,4954034,694383,718349,2004878,2004868,2008213,2002372,2008466,2008575,1999986,2011478,2099793,2101571,2105622,2100630,2105468,2110360,2099904,2107493,2109748,2120783,2397310,2400946,2399242,2401292,2401439,2395206,2401428,2394390,1850951,1848844,1852359,1846520,1858252,1857319,1847546,1848373,1857997,1855835,1856340,1863580,1870277,1869415,2533422,2534904,2534906,2534529,2534617,2537404,2538748,141231,4030879,147941,147948,4028686,243980,3826553,4030846,4024611,4024912,4028653,3826554,4030847,4024612,4024913,4028654,1668746,1663828,6712397,1666641,1668398,1679135,1669881,1672329,1674006,1674284,6726082,1672986,475723]
#10
⏱️ 11.77 мс
select * from "stores" where "stores"."id" in (6, 69, 85, 87, 106, 109, 114, 143, 149, 170, 259, 274, 278, 279, 281, 286, 306, 315, 320, 332, 429, 436, 437, 461, 482, 483, 485, 486, 535, 700, 727, 728, 745, 746, 759)
#11
⏱️ 16.69 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#12
⏱️ 371.11 мс
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:
[1110,700,727,728,745,746,759,775,171,170,278,259,286,320,332,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,88,87,85,106,109,114,143,166,208,268,274,279,281,315,306,429,436,437,461,485,486,535,1371,1385,1386,1409,149,6,83,true,"2026-09-08T07:07:08.938764Z"]
#13
⏱️ 7.11 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["jerusalem"]
#14
⏱️ 10.53 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 14.75 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]