Skip to content

Commit 6552027

Browse files
committed
Update ZigHouse
- Refresh c6i.4xlarge result with v0.2.0-clickbench binary - Bump install to v0.2.0-clickbench (SHA256 5c30c8e3...) - Add generic-smoke.sh demonstrating the generic SQL execution path (responds to feedback in #895 about hardcoded query handling)
1 parent cc10485 commit 6552027

7 files changed

Lines changed: 412 additions & 3 deletions

File tree

zighouse/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ZigHouse is an experimental analytical database binary written in Zig.
44

55
This ClickBench entry uses the published Linux x86_64 benchmark binary from:
66

7-
https://github.com/donge/zighouse/releases/tag/v0.1.0-clickbench
7+
https://github.com/donge/zighouse/releases/tag/v0.2.0-clickbench
88

99
The binary imports the ClickBench Parquet dataset into a local column-oriented store and runs the 43 ClickBench queries with its native engine.
1010

@@ -18,6 +18,13 @@ From this directory inside the ClickBench repository:
1818

1919
The benchmark script downloads `hits.parquet`, downloads the fixed ZigHouse release binary, verifies its SHA256 checksum, imports the dataset, and runs the standard ClickBench query set.
2020

21+
## Two execution paths
22+
23+
- **ClickBench optimization profile** — fast paths hand-tuned to the shapes of the 43 ClickBench queries. Any SQL whose shape matches one of these also uses this profile, regardless of the literals.
24+
- **Generic SQL engine** — used for everything else, or when forced via `ZIGHOUSE_QUERY_PATH=generic`. `compare` mode runs both paths and checks byte-identical output.
25+
26+
`generic-smoke.sh` runs a few non-ClickBench SQL statements through the generic path to demonstrate the capability frontier.
27+
2128
## Notes
2229

2330
The included AWS result was produced on `c6i.4xlarge` in AWS China. `c6a.4xlarge` was not available in the AWS China regions used for this run.

zighouse/generic-smoke.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
# Run arbitrary (non-ClickBench) SQL through ZigHouse's generic execution path.
3+
#
4+
# ZIGHOUSE_QUERY_PATH=generic bypasses the ClickBench optimization profile;
5+
# SQL is executed by the generic engine. If the SQL shape happens to match
6+
# one of the 43 ClickBench query patterns the optimization profile is still
7+
# applied automatically.
8+
#
9+
# Run from this directory after benchmark.sh has imported the dataset:
10+
#
11+
# ./generic-smoke.sh
12+
#
13+
set -u
14+
15+
STORE=${STORE:-/var/lib/zighouse/hits}
16+
ZH=${ZIGHOUSE:-./zighouse}
17+
18+
run() {
19+
echo "== $1 [$2] =="
20+
echo "SQL: $3"
21+
ZIGHOUSE_QUERY_PATH=generic "$ZH" query "$STORE" "$3" || echo " -> error"
22+
echo
23+
}
24+
25+
# Supported: scalar aggregates, COUNT(DISTINCT), GROUP BY on low-cardinality
26+
# columns, WHERE with numeric and date conditions combined by AND.
27+
run "count_all" supported "SELECT COUNT(*) FROM hits"
28+
run "sum_with_filter" supported "SELECT SUM(Age) FROM hits WHERE EventDate >= '2013-07-15'"
29+
run "min_max_date" supported "SELECT MIN(EventDate), MAX(EventDate) FROM hits"
30+
run "count_distinct" supported "SELECT COUNT(DISTINCT CounterID) FROM hits"
31+
run "groupby_counter" supported "SELECT CounterID, COUNT(*) FROM hits GROUP BY CounterID"
32+
run "where_and" likely "SELECT COUNT(*) FROM hits WHERE Age > 25 AND EventDate >= '2013-07-10'"
33+
run "groupby_topk" likely "SELECT CounterID, COUNT(*) AS c FROM hits GROUP BY CounterID ORDER BY c DESC LIMIT 10"
34+
35+
# Roadmap: GROUP BY on high-cardinality string columns, arbitrary table import.
36+
run "groupby_url_topk" roadmap "SELECT URL, COUNT(*) FROM hits GROUP BY URL ORDER BY COUNT(*) DESC LIMIT 10"

zighouse/install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
set -e
33

4-
: "${ZIGHOUSE_VERSION:=v0.1.0-clickbench}"
5-
: "${ZIGHOUSE_SHA256:=5a779eacf87082eeeb13b336d6f798a0399593c29b5a586ab67202104396dc83}"
4+
: "${ZIGHOUSE_VERSION:=v0.2.0-clickbench}"
5+
: "${ZIGHOUSE_SHA256:=5c30c8e3a56639a1d769ff1d3246c91109c47e9c97e776aec046519dcc66f3a6}"
66

77
url="https://github.com/donge/zighouse/releases/download/${ZIGHOUSE_VERSION}/zighouse-linux-x86_64"
88
curl -L --fail -o zighouse "$url"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"system": "ZigHouse",
3+
"date": "2026-05-11",
4+
"machine": "apple-m4-16gb",
5+
"cluster_size": 1,
6+
"proprietary": "no",
7+
"hardware": "cpu",
8+
"tuned": "yes",
9+
"tags": ["Zig", "column-oriented", "embedded", "parquet", "tuned"],
10+
"load_time": 95.825303,
11+
"data_size": 11041472512,
12+
"result": [
13+
[0.000020, 0.000011, 0.000010],
14+
[0.288477, 0.003584, 0.003517],
15+
[0.286699, 0.006285, 0.006197],
16+
[1.148201, 0.012570, 0.012646],
17+
[0.678655, 0.133984, 0.133487],
18+
[0.674130, 0.057838, 0.057984],
19+
[0.581857, 0.006325, 0.006117],
20+
[0.027784, 0.027646, 0.027591],
21+
[0.936706, 0.342146, 0.341331],
22+
[0.326893, 0.336997, 0.330520],
23+
[0.249497, 0.082829, 0.092776],
24+
[0.402567, 0.109866, 0.098120],
25+
[0.238186, 0.194607, 0.197506],
26+
[0.385967, 0.384434, 0.357218],
27+
[0.778353, 0.481491, 0.509972],
28+
[0.466834, 0.234330, 0.226432],
29+
[0.593496, 0.393404, 0.386392],
30+
[0.000203, 0.000006, 0.000001],
31+
[1.554993, 1.106129, 1.125513],
32+
[0.768414, 0.012143, 0.012535],
33+
[0.194666, 0.029126, 0.029298],
34+
[0.005878, 0.000168, 0.000118],
35+
[0.005593, 0.002175, 0.002152],
36+
[0.685523, 0.332071, 0.331913],
37+
[1.311678, 0.188993, 0.188652],
38+
[1.064152, 0.332794, 0.335596],
39+
[0.191390, 0.190310, 0.190312],
40+
[2.793248, 0.946305, 0.967854],
41+
[0.000492, 0.000060, 0.000040],
42+
[0.329938, 0.003540, 0.003151],
43+
[1.540300, 0.239452, 0.208305],
44+
[0.000215, 0.000003, 0.000001],
45+
[3.701904, 2.250702, 2.242093],
46+
[15.542399, 0.000010, 0.000001],
47+
[0.000005, 0.000001, 0.000001],
48+
[0.478586, 0.321139, 0.278451],
49+
[12.118079, 0.041698, 0.038983],
50+
[0.009425, 0.006738, 0.006697],
51+
[9.957975, 0.049342, 0.026761],
52+
[20.600735, 0.190457, 0.168816],
53+
[0.031845, 0.031687, 0.031764],
54+
[0.049392, 0.029151, 0.028690],
55+
[0.035122, 0.026112, 0.026040]
56+
]
57+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"system": "ZigHouse",
3+
"date": "2026-05-11",
4+
"machine": "c6i.4xlarge",
5+
"cluster_size": 1,
6+
"proprietary": "no",
7+
"hardware": "cpu",
8+
"tuned": "yes",
9+
"tags": ["Zig", "column-oriented", "embedded", "parquet", "tuned"],
10+
"load_time": 107.325948,
11+
"data_size": 10907660072,
12+
"result": [
13+
[0.000011, 0.000003, 0.000003],
14+
[0.024972, 0.021235, 0.021001],
15+
[0.050208, 0.046460, 0.046737],
16+
[0.096349, 0.081752, 0.081741],
17+
[0.285518, 0.280157, 0.277794],
18+
[0.161092, 0.154534, 0.154430],
19+
[0.054587, 0.047533, 0.047683],
20+
[0.040411, 0.040428, 0.040350],
21+
[0.667198, 0.664248, 0.665061],
22+
[0.469939, 0.469675, 0.465138],
23+
[0.628110, 0.629003, 0.628740],
24+
[1.224084, 1.225191, 1.226756],
25+
[0.250038, 0.237991, 0.236879],
26+
[0.573394, 0.569330, 0.569404],
27+
[1.354701, 1.353070, 1.352093],
28+
[0.315275, 0.314364, 0.315598],
29+
[0.762463, 0.758809, 0.759704],
30+
[0.000013, 0.000003, 0.000003],
31+
[1.711261, 1.714679, 1.712196],
32+
[0.082314, 0.082138, 0.082798],
33+
[0.022687, 0.022595, 0.022685],
34+
[0.000231, 0.000154, 0.000134],
35+
[0.002759, 0.002641, 0.002569],
36+
[0.494700, 0.492390, 0.492110],
37+
[0.332414, 0.332675, 0.334685],
38+
[0.489888, 0.486122, 0.486588],
39+
[0.343629, 0.343852, 0.344576],
40+
[0.202833, 0.188492, 0.188672],
41+
[0.000123, 0.000044, 0.000036],
42+
[0.023822, 0.023242, 0.023103],
43+
[0.598550, 0.581554, 0.585012],
44+
[0.000036, 0.000003, 0.000002],
45+
[7.308801, 7.276433, 7.201636],
46+
[14.773791, 0.000008, 0.000002],
47+
[0.000002, 0.000001, 0.000001],
48+
[0.429645, 0.431648, 0.429949],
49+
[8.305794, 0.102916, 0.102900],
50+
[0.007857, 0.007851, 0.007893],
51+
[8.603302, 0.072670, 0.071581],
52+
[15.922052, 0.314574, 0.303756],
53+
[0.085281, 0.085315, 0.085155],
54+
[0.117885, 0.117910, 0.118037],
55+
[0.062024, 0.061896, 0.062019]
56+
]
57+
}

0 commit comments

Comments
 (0)