#1
⏱️ 182.28 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#2
⏱️ 319.55 мс
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,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
⏱️ 202.5 мс
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,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
⏱️ 12.25 мс
select * from "canonical_products" where "canonical_products"."id" in (44, 89, 94, 226, 336)
#5
⏱️ 6.08 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?)
Bindings:
[44,226,336,94,89]
#6
⏱️ 636.43 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775651,8775580,8775533,8775532,8775519,8775509,7466366,7428697,3123983,2988675,2988001,2931321,2812735,2812350,2752778,2710285,2679322,2671473,2671026,2670964,2666758,2666027,2664001,2657576,2656726,2647878,2641760,2636398,2634369,2633097,2631399,2610312,160965,124776,2191445,207017,165988,100062,2657528,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
⏱️ 11.55 мс
select * from "stores" where "stores"."id" in (6, 69, 106, 109, 114, 143, 149, 332, 535, 700, 727, 728, 746)
#8
⏱️ 83.22 мс
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 = 7428697 THEN 7428697 WHEN sp.master_product_id = 160965 THEN 7428697 WHEN sp.master_product_id = 2657576 THEN 2657576 WHEN sp.master_product_id = 124776 THEN 2657576 WHEN sp.master_product_id = 2191445 THEN 2671473 WHEN sp.master_product_id = 2671473 THEN 2671473 WHEN sp.master_product_id = 207017 THEN 2988001 WHEN sp.master_product_id = 2988001 THEN 2988001 WHEN sp.master_product_id = 165988 THEN 2988001 WHEN sp.master_product_id = 100062 THEN 2988001 WHEN sp.master_product_id = 2679322 THEN 2679322 WHEN sp.master_product_id = 2657528 THEN 2679322 ELSE sp.master_product_id END limit 500
Bindings:
[8775651,8775580,8775533,8775532,8775519,8775509,7466366,7428697,3123983,2988675,2988001,2931321,2812735,2812350,2752778,2710285,2679322,2671473,2671026,2670964,2666758,2666027,2664001,2657576,2656726,2647878,2641760,2636398,2634369,2633097,2631399,2610312,160965,124776,2191445,207017,165988,100062,2657528,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
⏱️ 96.86 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1567683,4121827,6499128,6542632,6519002,5492296,5007095,560447,659672,699159,722590,2003489,2006898,2002296,2000093,2000116,2000128,2000159,2000214,2100417,2102766,2104069,2104390,2105911,2110424,2099540,2113266,2112704,2113931,2395984,2402742,2395967,2403420,2402460,2402472,2402478,2402486,2402515,2403415,2395985,2396264,2398451,1856209,1849494,1850502,1851312,1851810,1853998,1858221,1846005,1856597,1851340,1851263,1851894,1862305,1866733,1859968,1866065,1866330,1866585,1867138,1870363,1860860,1862335,2537869,2537887,2537780,9559623,9559646,9612845,9559922,9560129,9560428,9560451,9570916,9581312,248753,9440225,9440285,9440959,9440226,9440266,9440288,9440290,9440408,9440593,9559603,9559626,9612825,9559902,9560109,9560408,9560431,9570896,9581292,1658414,1661278,1654663,1655514,1662296,1664366,1665087,1668355,1668417,1655466,1677098,1679959,199930,201181,1675953,1681650,1682977,1670561,1672485,1678895,1678695,1674621,479015]
#10
⏱️ 12.68 мс
select * from "stores" where "stores"."id" in (6, 69, 106, 109, 114, 143, 149, 170, 286, 320, 332, 429, 436, 437, 461, 482, 483, 486, 535, 700, 727, 728, 745, 746, 759)
#11
⏱️ 20.65 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#12
⏱️ 1382.93 мс
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-08T08:59:53.342113Z"]
#13
⏱️ 5.75 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["jerusalem"]
#14
⏱️ 10.42 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 12.12 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]