#1
⏱️ 27.77 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#2
⏱️ 428.25 мс
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","herbs_mushrooms",1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,true,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,"produce"]
#3
⏱️ 228.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","herbs_mushrooms",1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,true,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,"produce"]
#4
⏱️ 3.67 мс
select * from "canonical_products" where "canonical_products"."id" in (79, 94, 111, 193, 215, 235)
#5
⏱️ 9.47 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[193,94,215,235,111,79]
#6
⏱️ 497.85 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775532,8775509,7529293,7493489,3929128,3918545,3771787,3700048,3123983,2931321,2812735,2812350,2752778,2710285,2671473,2671026,2670964,2666758,2666106,2664001,2656726,2641760,2634369,2633097,2604820,2604816,2257475,2190128,1962114,1954569,1912369,1912088,97564,2191445,703893,112362,112366,112361,true,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332]
#7
⏱️ 2.08 мс
select * from "stores" where "stores"."id" in (6, 83, 85, 87, 88, 106, 109, 114, 143, 149, 274, 278, 279, 281, 286, 535, 700, 727, 728, 745, 746)
#8
⏱️ 15.44 мс
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 = 2190128 THEN 2190128 WHEN sp.master_product_id = 97564 THEN 2190128 WHEN sp.master_product_id = 2191445 THEN 2671473 WHEN sp.master_product_id = 2671473 THEN 2671473 WHEN sp.master_product_id = 703893 THEN 2257475 WHEN sp.master_product_id = 2257475 THEN 2257475 WHEN sp.master_product_id = 7529293 THEN 7529293 WHEN sp.master_product_id = 112362 THEN 7529293 WHEN sp.master_product_id = 2604820 THEN 2604820 WHEN sp.master_product_id = 112366 THEN 2604820 WHEN sp.master_product_id = 112361 THEN 2604816 WHEN sp.master_product_id = 2604816 THEN 2604816 ELSE sp.master_product_id END limit 500
Bindings:
[8775532,8775509,7529293,7493489,3929128,3918545,3771787,3700048,3123983,2931321,2812735,2812350,2752778,2710285,2671473,2671026,2670964,2666758,2666106,2664001,2656726,2641760,2634369,2633097,2604820,2604816,2257475,2190128,1962114,1954569,1912369,1912088,97564,2191445,703893,112362,112366,112361,0,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332]
#9
⏱️ 48.77 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1564533,4805018,4807682,4795688,4793195,4793201,4793196,4750448,4743714,4706274,4695510,4695515,4695511,4684158,4675021,4675026,4675022,5476939,4989612,557554,4955667,4976166,4976171,4976167,4916484,4916489,4916485,5433092,5435884,5420630,5418325,5418330,5418326,5742144,5744094,5727592,5729290,5727389,5727394,5727390,5705816,5708133,5691192,5691196,5691193,5638396,5640793,5626375,5624049,5624057,5624053,5469647,5469966,5454996,657586,5454495,5454500,5454496,696845,2011963,10516518,2006898,2000093,10514334,2000128,2000159,2000214,10500875,10519796,29379774,29387944,10513337,2108044,10714830,10695446,67743160,2102766,2105668,2104390,2105911,2110424,33250319,67746556,29478791,31132772,31150078,31150083,31144987,77738575,29489821,10728968,29491695,29494295,29501208,31140199,2113931,29489701,10735932,29949693,11521163,11506724,82918610,11530436,2402460,2393741,2402478,2402486,2402515,2395985,2396264,2398451,56401090,29939640,56401419,56398487,2395199,1856301,1856305,1849494,1850502,29243259,1851810,1853998,1858221,10361182,1856597,29234722,1851340,33020847,38710487,1857135,1870934,10374848,1866733,1866065,33025448,1866585,1867138,1870363,1862335,29255297,67521093,10376464,55870805,1870935,31698531,12095814,57914764,33807418,33807417,33806254,12104777,2537869,12104713,47649415,31700148,78565642,9559163,145347,145352,9559623,9612845,145348,9559922,9560428,246351,9440235,3946523,3946738,9440225,9440959,3946566,9440226,9440288,9559143,3946524,3946739,9559603,9612825,3946567,9559902,9560408,6722692,1668086,63276868,1654663,1662296,1664443,1665087,1668355,1668417,56690709,83735707,38525322,6722693,205947,205949,1679959,199930,1681650,1670050,1670561,1672485,1678895,1678695,26379343,1675594]
#10
⏱️ 1.83 мс
select * from "stores" where "stores"."id" in (6, 83, 85, 87, 88, 143, 149, 170, 171, 274, 278, 279, 281, 286, 320, 429, 436, 437, 461, 482, 483, 485, 486, 535, 700, 727, 728, 745, 746)
#11
⏱️ 2.44 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#12
⏱️ 214.24 мс
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,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,true,"2026-10-22T23:16:51.505517Z"]
#13
⏱️ 1.59 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["jerusalem"]
#14
⏱️ 1.21 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 1.69 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]