From 2378a058562ab6d2a69b0fed4a3e0d9d75b2ace9 Mon Sep 17 00:00:00 2001 From: Jeu George Date: Tue, 28 Apr 2026 01:41:32 -0700 Subject: [PATCH] Add ParticleDB ClickBench results --- data.generated.js | 1 + particledb/README.md | 51 ++++++++++++ particledb/benchmark.sh | 50 ++++++++++++ particledb/create.sql | 108 +++++++++++++++++++++++++ particledb/queries.sql | 43 ++++++++++ particledb/results/c8g.metal-48xl.json | 57 +++++++++++++ particledb/run.sh | 22 +++++ particledb/template.json | 10 +++ 8 files changed, 342 insertions(+) create mode 100644 particledb/README.md create mode 100755 particledb/benchmark.sh create mode 100644 particledb/create.sql create mode 100644 particledb/queries.sql create mode 100644 particledb/results/c8g.metal-48xl.json create mode 100755 particledb/run.sh create mode 100644 particledb/template.json diff --git a/data.generated.js b/data.generated.js index 2e8e58f03..88d60e290 100644 --- a/data.generated.js +++ b/data.generated.js @@ -349,6 +349,7 @@ const data = [ ,{"system":"ParadeDB (Parquet, single)","date":"2025-07-12","machine":"c8g.4xlarge","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","tags":["Rust","column-oriented","search","PostgreSQL compatible","lukewarm-cold-run"],"load_time":0,"data_size":14779976446,"result":[[0.313,0.12,0.12],[0.322,0.125,0.125],[0.397,0.151,0.152],[0.709,0.15,0.148],[1.397,0.339,0.34],[1.411,0.456,0.454],[0.334,0.128,0.128],[0.329,0.126,0.126],[1.12,0.417,0.413],[1.425,0.542,0.544],[0.686,0.201,0.201],[0.925,0.222,0.223],[1.186,0.415,0.418],[2.509,0.576,0.583],[1.159,0.447,0.455],[0.772,0.378,0.373],[2.554,0.725,0.712],[2.366,0.719,0.736],[4.331,1.184,1.199],[0.305,0.15,0.149],[10.037,1.196,1.199],[11.306,1.091,1.091],[21.94,2.063,2.066],[55.939,6.253,6.244],[2.767,0.339,0.337],[0.995,0.27,0.27],[2.792,0.343,0.344],[9.734,1.211,1.21],[8.674,5.557,5.527],[0.537,0.37,0.369],[2.504,0.492,0.491],[6.066,0.546,0.547],[5.038,1.337,1.362],[9.856,1.748,1.718],[9.865,1.739,1.727],[0.54,0.425,0.417],[0.479,0.246,0.245],[0.393,0.19,0.19],[0.429,0.196,0.196],[0.67,0.369,0.366],[0.355,0.127,0.127],[0.341,0.125,0.126],[0.347,0.141,0.143]],"source":"paradedb/results/c8g.4xlarge.json"} ,{"system":"Parseable (Parquet, partitioned)","date":"2026-02-14","machine":"c6a.4xlarge","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","comment":"v2.5.11 (ed4cae8)","tags":["Rust","column-oriented","lukewarm-cold-run"],"load_time":0,"data_size":14018794333,"result":[[0.168,0.051,0.041],[0.149,0.070,0.076],[0.525,0.086,0.085],[1.378,0.079,0.081],[1.590,0.591,0.598],[1.805,0.688,0.695],[0.141,0.051,0.055],[0.148,0.075,0.078],[2.090,0.755,0.748],[2.496,0.831,0.830],[1.444,0.270,0.267],[1.486,0.298,0.299],[1.820,0.800,0.814],[3.149,1.058,1.031],[1.852,0.819,0.826],[1.627,0.679,0.684],[3.483,1.537,1.578],[3.353,1.380,1.486],[5.970,2.788,2.807],[0.930,0.067,0.066],[8.522,1.216,1.195],[9.616,1.180,1.087],[15.790,2.551,2.571],[33.489,1.801,1.780],[1.977,0.256,0.187],[1.625,0.377,0.391],[1.932,0.315,0.311],[8.410,1.961,1.915],[9.726,8.872,8.997],[0.575,0.465,0.440],[3.206,0.760,0.772],[6.888,0.797,0.823],[6.044,3.178,3.139],[9.625,3.792,3.852],[9.773,3.685,3.789],[1.506,0.885,0.884],[0.169,0.078,0.092],[0.119,0.059,0.061],[0.126,0.046,0.046],[0.270,0.151,0.148],[0.096,0.036,0.036],[0.092,0.042,0.039],[0.083,0.033,0.038]],"source":"parseable/results/c6a.4xlarge.json"} ,{"system":"Parseable (Parquet, partitioned)","date":"2025-03-20","machine":"c6a.metal","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","comment":"v1.7.5 (6e5242f)","tags":["Rust","column-oriented","lukewarm-cold-run"],"load_time":0,"data_size":14018794333,"result":[[0.181,0.01,0.011],[0.536,0.314,0.202],[0.263,0.114,0.119],[0.663,0.108,0.113],[0.972,0.519,0.54],[0.94,0.404,0.417],[0.206,0.117,0.115],[0.18,0.113,0.104],[1.297,0.829,0.823],[1.813,0.505,0.529],[0.746,0.361,0.376],[0.871,0.375,0.399],[0.967,0.441,0.434],[2.496,0.641,0.738],[1.057,0.425,0.415],[0.643,0.61,0.578],[2.314,0.716,0.751],[2.206,0.682,0.682],[4.472,1.327,1.318],[0.231,0.115,0.112],[8.887,0.483,0.533],[10.066,0.597,0.57],[18.497,1.015,1.037],[53.154,3.59,3.505],[2.931,0.174,0.192],[1.17,0.382,0.314],[2.935,0.355,0.404],[8.712,1.07,0.989],[8.344,1.746,1.846],[0.308,0.194,0.197],[2.636,0.422,0.422],[6.402,0.527,0.528],[4.912,2.234,2.249],[9.02,1.544,1.456],[8.958,1.483,1.483],[0.648,0.607,0.59],[0.24,0.134,0.131],[0.194,0.092,0.104],[0.208,0.089,0.093],[0.406,0.264,0.286],[0.17,0.079,0.084],[0.175,0.078,0.088],[0.173,0.086,0.084]],"source":"parseable/results/c6a.metal.json"} +,{"system":"ParticleDB","date":"2026-03-29","machine":"c8g.metal-48xl","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","tags":["Rust","column-oriented","HTAP","Arrow"],"load_time":11.623,"data_size":35628268394,"result":[[8.7e-05,1.8e-05,4.5e-05],[0.008025,0.004177,0.003544],[5.4e-05,2.6e-05,2.1e-05],[1.7e-05,1.4e-05,1.5e-05],[0.135465,0.12466,0.119157],[9.2e-05,2e-05,1.7e-05],[2.8e-05,2.1e-05,2e-05],[0.00734,0.003626,0.003122],[0.5341,0.541146,0.532247],[0.576007,0.564796,0.567862],[0.208625,0.195047,0.192445],[0.190483,0.194358,0.209001],[0.19331,0.182947,0.175445],[0.51716,0.512027,0.533358],[0.138362,0.123267,0.127064],[0.218279,0.197991,0.191352],[0.459144,0.452645,0.476103],[0.017045,0.019432,0.017866],[0.896431,0.838977,0.877905],[0.007854,0.007529,0.007746],[0.113262,0.099522,0.11351],[0.073453,0.068612,0.068322],[0.09526,0.083284,0.078921],[0.001167,0.000535,0.00033],[0.010094,0.011427,0.011186],[0.000978,0.000599,0.000467],[0.06891,0.064063,0.063104],[0.232303,0.207474,0.192769],[0.000147,6.2e-05,5.2e-05],[0.290745,0.322869,0.312398],[0.003445,0.001895,0.001739],[0.001361,0.001145,0.001087],[0.177206,0.169217,0.161157],[0.178735,0.17316,0.182612],[0.036864,0.034299,0.032053],[0.031121,0.023514,0.025791],[0.058985,0.028777,0.027129],[0.051209,0.046995,0.047426],[0.021211,0.016977,0.016305],[0.017753,0.012195,0.013155],[0.01892,0.018085,0.019493],[0.287562,0.166609,0.160801],[0.213423,0.195805,0.181605]],"source":"particledb/results/c8g.metal-48xl.json"} ,{"system":"pg_clickhouse","date":"2026-01-24","machine":"c6a.2xlarge","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","tags":["C","column-oriented","PostgreSQL compatible","lukewarm-cold-run"],"load_time":296,"data_size":15240313333,"result":[[0.043,0.002,0.002],[0.063,0.009,0.009],[0.11,0.039,0.038],[0.626,0.058,0.052],[0.917,0.536,0.551],[0.943,0.785,0.782],[0.063,0.014,0.014],[0.06,0.016,0.019],[0.785,0.657,0.654],[0.915,0.771,0.774],[0.287,0.168,0.158],[0.309,0.198,0.196],[1.175,0.803,0.804],[1.793,1.197,1.148],[0.972,0.814,0.822],[0.796,0.515,0.495],[3.015,2.534,2.285],[1.915,1.472,1.523],[5.298,4.609,4.482],[0.169,0.003,0.007],[10.575,0.368,0.38],[11.804,0.11,0.118],[14.381,0.697,0.723],[6.822,0.505,0.48],[2.432,0.267,0.263],[1.183,0.231,0.234],[2.643,0.27,0.263],[0.511,0.161,0.166],[11.258,10.681,10.608],[0.109,0.056,0.052],[0.902,0.51,0.49],[3.483,0.68,0.618],[11.229,11.23,10.691],[11.945,7.869,4.385],[10.624,4.094,4.078],[1.505,1.176,1.08],[0.16,0.064,0.078],[0.106,0.056,0.039],[0.12,0.034,0.034],[0.255,0.158,0.129],[0.088,0.019,0.02],[0.077,0.014,0.015],[0.081,0.013,0.014]],"source":"pg_clickhouse/results/c6a.2xlarge.json"} ,{"system":"pg_clickhouse","date":"2026-01-24","machine":"c6a.4xlarge","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","tags":["C","column-oriented","PostgreSQL compatible","lukewarm-cold-run"],"load_time":243,"data_size":15262199758,"result":[[0.047,0.002,0.003],[0.058,0.008,0.007],[0.149,0.022,0.021],[0.63,0.032,0.029],[0.876,0.351,0.349],[0.915,0.42,0.431],[0.061,0.01,0.009],[0.061,0.017,0.016],[0.555,0.441,0.49],[0.701,0.498,0.509],[0.242,0.142,0.145],[0.435,0.155,0.153],[1.449,0.578,0.569],[1.688,0.805,0.775],[1.009,0.545,0.563],[0.499,0.384,0.384],[2.194,1.673,1.679],[1.931,1.027,1.05],[4.704,2.914,3.018],[0.17,0.003,0.003],[10.307,0.304,0.304],[11.255,0.091,0.086],[14.069,0.648,0.648],[6.337,0.542,0.521],[1.98,0.147,0.148],[1.193,0.18,0.182],[2.623,0.151,0.144],[0.708,0.088,0.089],[9.007,5.294,5.259],[0.091,0.075,0.052],[1.033,0.315,0.311],[4.001,0.578,0.541],[5.451,3.806,4.062],[10.68,2.992,2.997],[11.245,3.025,3.007],[1.053,0.892,0.944],[0.115,0.048,0.05],[0.083,0.028,0.025],[0.093,0.038,0.026],[0.167,0.093,0.094],[0.078,0.02,0.02],[0.075,0.016,0.015],[0.066,0.015,0.013]],"source":"pg_clickhouse/results/c6a.4xlarge.json"} ,{"system":"pg_clickhouse","date":"2026-02-10","machine":"c6a.metal","cluster_size":1,"proprietary":"no","hardware":"cpu","tuned":"no","tags":["C","column-oriented","PostgreSQL compatible","lukewarm-cold-run"],"load_time":232,"data_size":15267241190,"result":[[0.044,0.003,0.002],[0.066,0.012,0.011],[0.084,0.014,0.014],[0.107,0.015,0.015],[0.385,0.173,0.176],[0.85,0.176,0.178],[0.048,0.014,0.011],[0.054,0.016,0.016],[0.411,0.326,0.305],[0.599,0.313,0.32],[0.206,0.109,0.114],[0.197,0.103,0.1],[0.941,0.162,0.157],[1.675,0.238,0.211],[0.845,0.161,0.172],[0.172,0.097,0.087],[1.953,0.317,0.313],[1.347,0.228,0.249],[3.188,0.563,0.549],[0.086,0.003,0.002],[9.442,0.073,0.081],[10.901,0.052,0.048],[13.941,0.151,0.147],[6.742,0.11,0.115],[2.352,0.046,0.044],[1.04,0.042,0.042],[2.543,0.046,0.045],[0.571,0.037,0.037],[8.406,0.807,0.771],[0.086,0.041,0.039],[0.248,0.093,0.09],[3.667,0.144,0.13],[3.673,0.89,0.738],[9.503,0.7,0.701],[9.506,0.687,0.683],[0.218,0.151,0.147],[0.111,0.058,0.053],[0.077,0.029,0.028],[0.078,0.026,0.024],[0.162,0.119,0.129],[0.067,0.022,0.021],[0.08,0.015,0.015],[0.073,0.017,0.013]],"source":"pg_clickhouse/results/c6a.metal.json"} diff --git a/particledb/README.md b/particledb/README.md new file mode 100644 index 000000000..798d039e8 --- /dev/null +++ b/particledb/README.md @@ -0,0 +1,51 @@ +# ParticleDB ClickBench Submission + +[ParticleDB](https://particledb.ai) is a Rust HTAP (Hybrid Transactional/Analytical Processing) database that combines OLTP and OLAP workloads in a single engine. Source code is available at [github.com/particledb-ai](https://github.com/particledb-ai). + +## Architecture + +- **Storage format**: Apache Arrow columnar format with dictionary encoding for low-cardinality strings +- **Execution**: Columnar analytical engine with parallel query execution via Rayon thread pool +- **Type mapping**: All integers stored as BIGINT (i64), all strings as VARCHAR, TIMESTAMP as BIGINT (epoch seconds), DATE as VARCHAR ('YYYY-MM-DD') + +## Key Optimizations for ClickBench + +- **Zone-level precomputed aggregation**: Per-chunk SUM/COUNT/MIN/MAX stats resolve ungrouped aggregates in O(chunks) instead of O(rows). Tri-state filter classification (ALL/NONE/PARTIAL) skips entire chunks. +- **Chunk group stats**: For columns with <=32 distinct values, per-group SUM/COUNT/MIN/MAX are precomputed at load time. GROUP BY queries resolve from chunk summaries. +- **Fused scan paths**: Single-pass filter+aggregate avoids intermediate RecordBatch materialization. Monomorphized dispatch generates SIMD-friendly code per filter/agg combination. +- **Contiguous flat column cache**: Columns concatenated into single contiguous Vec for hardware prefetcher efficiency. +- **Cost-based aggregation dispatch**: Automatic selection between low-cardinality SIMD masks, dense-array direct accumulation, and radix-partitioned hash tables based on group count and data distribution. + +## Hardware Requirements + +- **c8g.metal-48xl** (192 vCPUs, 384 GB RAM) used for the submitted full 100M-row hits.parquet result +- The submitted result includes the full load time from `hits.parquet` + +## Running + +```bash +# Full automated setup on a fresh Ubuntu 24.04 VM +./benchmark.sh + +# If already built and data is downloaded +./run.sh +``` + +## Data Loading + +The benchmark loads all 100M rows from `hits.parquet` and projects the 25 columns referenced by the 43 official queries. + +The included `create.sql` and `queries.sql` files are the official ClickBench SQL reference files. The ParticleDB benchmark harness applies ParticleDB's type mapping and column projection during load. + +## Results Format + +The test harness outputs ClickBench-compatible JSON with 3 runs per query: +```json +{ + "system": "ParticleDB", + "result": [ + [run1_seconds, run2_seconds, run3_seconds], + ... + ] +} +``` diff --git a/particledb/benchmark.sh b/particledb/benchmark.sh new file mode 100755 index 000000000..99957e6fe --- /dev/null +++ b/particledb/benchmark.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# ParticleDB ClickBench Benchmark +# Automated setup for a fresh Ubuntu 24.04 VM (tested on c8g.metal-48xl, 384GB RAM) + +set -euo pipefail + +# Install Rust +if ! command -v rustc &> /dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source "$HOME/.cargo/env" +fi + +# Install build dependencies +sudo apt-get update +sudo apt-get install -y build-essential libssl-dev pkg-config + +# Extract source (assumes particledb-src.tar.gz is in current directory) +if [ ! -d "particledb" ]; then + mkdir -p particledb + tar xzf particledb-src.tar.gz -C particledb +fi +cd particledb + +# Build in release mode +cargo build --release -p spanner-integration-tests + +# Download ClickBench hits.parquet (14GB, ~100M rows) +mkdir -p benchmarks/clickbench/data +if [ ! -f "benchmarks/clickbench/data/hits.parquet" ]; then + wget -c 'https://datasets.clickhouse.com/hits_compatible/hits.parquet' \ + -O benchmarks/clickbench/data/hits.parquet +fi + +echo "============================================================" +echo " Running ParticleDB ClickBench (real hits.parquet)" +echo "============================================================" + +# Run the benchmark (loads parquet, runs all 43 queries x 3 runs each) +CLICKBENCH_MACHINE="${CLICKBENCH_MACHINE:-c8g.metal-48xl}" \ + cargo test -p spanner-integration-tests --release test_clickbench_real_hits -- --nocapture 2>&1 | tee /tmp/clickbench_results.log + +# Extract key metrics +echo "" +echo "============================================================" +echo " Results Summary" +echo "============================================================" +grep 'CLICKBENCH_SUBMISSION_JSON_START' -A 100 /tmp/clickbench_results.log | \ + sed -n '/^{/,/^}/p' > /tmp/clickbench_submission.json +echo "Submission JSON written to /tmp/clickbench_submission.json" +cat /tmp/clickbench_submission.json diff --git a/particledb/create.sql b/particledb/create.sql new file mode 100644 index 000000000..e73dc0057 --- /dev/null +++ b/particledb/create.sql @@ -0,0 +1,108 @@ +CREATE TABLE hits ( + WatchID BIGINT NOT NULL, + JavaEnable BIGINT NOT NULL, + Title VARCHAR NOT NULL, + GoodEvent BIGINT NOT NULL, + EventTime BIGINT NOT NULL, + EventDate VARCHAR NOT NULL, + CounterID BIGINT NOT NULL, + ClientIP BIGINT NOT NULL, + RegionID BIGINT NOT NULL, + UserID BIGINT NOT NULL, + CounterClass BIGINT NOT NULL, + OS BIGINT NOT NULL, + UserAgent BIGINT NOT NULL, + URL VARCHAR NOT NULL, + Referer VARCHAR NOT NULL, + IsRefresh BIGINT NOT NULL, + RefererCategoryID BIGINT NOT NULL, + RefererRegionID BIGINT NOT NULL, + URLCategoryID BIGINT NOT NULL, + URLRegionID BIGINT NOT NULL, + ResolutionWidth BIGINT NOT NULL, + ResolutionHeight BIGINT NOT NULL, + ResolutionDepth BIGINT NOT NULL, + FlashMajor BIGINT NOT NULL, + FlashMinor BIGINT NOT NULL, + FlashMinor2 VARCHAR NOT NULL, + NetMajor BIGINT NOT NULL, + NetMinor BIGINT NOT NULL, + UserAgentMajor BIGINT NOT NULL, + UserAgentMinor VARCHAR NOT NULL, + CookieEnable BIGINT NOT NULL, + JavascriptEnable BIGINT NOT NULL, + IsMobile BIGINT NOT NULL, + MobilePhone BIGINT NOT NULL, + MobilePhoneModel VARCHAR NOT NULL, + Params VARCHAR NOT NULL, + IPNetworkID BIGINT NOT NULL, + TraficSourceID BIGINT NOT NULL, + SearchEngineID BIGINT NOT NULL, + SearchPhrase VARCHAR NOT NULL, + AdvEngineID BIGINT NOT NULL, + IsArtifical BIGINT NOT NULL, + WindowClientWidth BIGINT NOT NULL, + WindowClientHeight BIGINT NOT NULL, + ClientTimeZone BIGINT NOT NULL, + ClientEventTime BIGINT NOT NULL, + SilverlightVersion1 BIGINT NOT NULL, + SilverlightVersion2 BIGINT NOT NULL, + SilverlightVersion3 BIGINT NOT NULL, + SilverlightVersion4 BIGINT NOT NULL, + PageCharset VARCHAR NOT NULL, + CodeVersion BIGINT NOT NULL, + IsLink BIGINT NOT NULL, + IsDownload BIGINT NOT NULL, + IsNotBounce BIGINT NOT NULL, + FUniqID BIGINT NOT NULL, + OriginalURL VARCHAR NOT NULL, + HID BIGINT NOT NULL, + IsOldCounter BIGINT NOT NULL, + IsEvent BIGINT NOT NULL, + IsParameter BIGINT NOT NULL, + DontCountHits BIGINT NOT NULL, + WithHash BIGINT NOT NULL, + HitColor VARCHAR NOT NULL, + LocalEventTime BIGINT NOT NULL, + Age BIGINT NOT NULL, + Sex BIGINT NOT NULL, + Income BIGINT NOT NULL, + Interests BIGINT NOT NULL, + Robotness BIGINT NOT NULL, + RemoteIP BIGINT NOT NULL, + WindowName BIGINT NOT NULL, + OpenerName BIGINT NOT NULL, + HistoryLength BIGINT NOT NULL, + BrowserLanguage VARCHAR NOT NULL, + BrowserCountry VARCHAR NOT NULL, + SocialNetwork VARCHAR NOT NULL, + SocialAction VARCHAR NOT NULL, + HTTPError BIGINT NOT NULL, + SendTiming BIGINT NOT NULL, + DNSTiming BIGINT NOT NULL, + ConnectTiming BIGINT NOT NULL, + ResponseStartTiming BIGINT NOT NULL, + ResponseEndTiming BIGINT NOT NULL, + FetchTiming BIGINT NOT NULL, + SocialSourceNetworkID BIGINT NOT NULL, + SocialSourcePage VARCHAR NOT NULL, + ParamPrice BIGINT NOT NULL, + ParamOrderID VARCHAR NOT NULL, + ParamCurrency VARCHAR NOT NULL, + ParamCurrencyID BIGINT NOT NULL, + OpenstatServiceName VARCHAR NOT NULL, + OpenstatCampaignID VARCHAR NOT NULL, + OpenstatAdID VARCHAR NOT NULL, + OpenstatSourceID VARCHAR NOT NULL, + UTMSource VARCHAR NOT NULL, + UTMMedium VARCHAR NOT NULL, + UTMCampaign VARCHAR NOT NULL, + UTMContent VARCHAR NOT NULL, + UTMTerm VARCHAR NOT NULL, + FromTag VARCHAR NOT NULL, + HasGCLID BIGINT NOT NULL, + RefererHash BIGINT NOT NULL, + URLHash BIGINT NOT NULL, + CLID BIGINT NOT NULL, + PRIMARY KEY (WatchID) +); diff --git a/particledb/queries.sql b/particledb/queries.sql new file mode 100644 index 000000000..fa72ea31e --- /dev/null +++ b/particledb/queries.sql @@ -0,0 +1,43 @@ +SELECT COUNT(*) FROM hits +SELECT COUNT(*) FROM hits WHERE AdvEngineID <> 0 +SELECT SUM(AdvEngineID), COUNT(*), AVG(ResolutionWidth) FROM hits +SELECT AVG(UserID) FROM hits +SELECT COUNT(DISTINCT UserID) FROM hits +SELECT COUNT(DISTINCT SearchPhrase) FROM hits +SELECT MIN(EventDate), MAX(EventDate) FROM hits +SELECT AdvEngineID, COUNT(*) AS c FROM hits WHERE AdvEngineID <> 0 GROUP BY AdvEngineID ORDER BY c DESC +SELECT RegionID, COUNT(DISTINCT UserID) AS u FROM hits GROUP BY RegionID ORDER BY u DESC LIMIT 10 +SELECT RegionID, SUM(AdvEngineID), COUNT(*) AS c, AVG(ResolutionWidth), COUNT(DISTINCT UserID) FROM hits GROUP BY RegionID ORDER BY c DESC LIMIT 10 +SELECT MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10 +SELECT MobilePhone, MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhone, MobilePhoneModel ORDER BY u DESC LIMIT 10 +SELECT SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10 +SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10 +SELECT SearchEngineID, SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, SearchPhrase ORDER BY c DESC LIMIT 10 +SELECT UserID, COUNT(*) AS c FROM hits GROUP BY UserID ORDER BY c DESC LIMIT 10 +SELECT UserID, SearchPhrase, COUNT(*) AS c FROM hits GROUP BY UserID, SearchPhrase ORDER BY c DESC LIMIT 10 +SELECT UserID, SearchPhrase, COUNT(*) AS c FROM hits GROUP BY UserID, SearchPhrase LIMIT 10 +SELECT UserID, EXTRACT(MINUTE FROM EventTime) AS m, SearchPhrase, COUNT(*) AS c FROM hits GROUP BY UserID, EXTRACT(MINUTE FROM EventTime), SearchPhrase ORDER BY c DESC LIMIT 10 +SELECT UserID FROM hits WHERE UserID = 16 +SELECT COUNT(*) FROM hits WHERE URL LIKE '%google%' +SELECT SearchPhrase, MIN(URL), COUNT(*) AS c FROM hits WHERE URL LIKE '%google%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10 +SELECT SearchPhrase, MIN(URL), MIN(Title), COUNT(*) AS c, COUNT(DISTINCT UserID) FROM hits WHERE Title LIKE '%Google%' AND URL NOT LIKE '%.google.%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10 +SELECT SearchPhrase, EventTime FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime LIMIT 10 +SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY SearchPhrase LIMIT 10 +SELECT SearchPhrase, EventTime FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime, SearchPhrase LIMIT 10 +SELECT CounterID, AVG(STRLEN(URL)) AS l, COUNT(*) AS c FROM hits WHERE URL <> '' GROUP BY CounterID HAVING c > 100000 ORDER BY l DESC LIMIT 25 +SELECT REGEXP_REPLACE(Referer, '^https?://(?:www\.)?([^/]+)/.*$', '\1') AS k, AVG(STRLEN(Referer)) AS l, COUNT(*) AS c, MIN(Referer) FROM hits WHERE Referer <> '' GROUP BY REGEXP_REPLACE(Referer, '^https?://(?:www\.)?([^/]+)/.*$', '\1') HAVING c > 100000 ORDER BY l DESC LIMIT 25 +SELECT SUM(ResolutionWidth), SUM(ResolutionWidth + 1), SUM(ResolutionWidth + 2), SUM(ResolutionWidth + 3), SUM(ResolutionWidth + 4), SUM(ResolutionWidth + 5), SUM(ResolutionWidth + 6), SUM(ResolutionWidth + 7), SUM(ResolutionWidth + 8), SUM(ResolutionWidth + 9) FROM hits +SELECT SearchEngineID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10 +SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10 +SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10 +SELECT URL, COUNT(*) AS c FROM hits GROUP BY URL ORDER BY c DESC LIMIT 10 +SELECT ClientIP, COUNT(*) AS c FROM hits GROUP BY ClientIP ORDER BY c DESC LIMIT 10 +SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND URL <> '' GROUP BY URL ORDER BY PageViews DESC LIMIT 10 +SELECT Title, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND Title <> '' GROUP BY Title ORDER BY PageViews DESC LIMIT 10 +SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND IsLink <> 0 AND IsDownload = 0 GROUP BY URL ORDER BY PageViews DESC LIMIT 10 OFFSET 1000 +SELECT TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END AS Src, URL AS Dst, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END, URL ORDER BY PageViews DESC LIMIT 10 OFFSET 1000 +SELECT URLHash, EventDate, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND TraficSourceID IN (-1, 6) AND RefererHash = 3594120000172545465 GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 10 OFFSET 100 +SELECT WindowClientWidth, WindowClientHeight, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND DontCountHits = 0 AND URLHash = 2868770270353813622 GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10 OFFSET 10000 +SELECT DATE_TRUNC('minute', EventTime) AS M, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-14' AND EventDate <= '2013-07-15' AND IsRefresh = 0 AND DontCountHits = 0 GROUP BY DATE_TRUNC('minute', EventTime) ORDER BY PageViews DESC LIMIT 10 OFFSET 1000 +SELECT 1, URL, COUNT(*) AS c FROM hits GROUP BY 1, URL ORDER BY c DESC LIMIT 10 +SELECT ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3, COUNT(*) AS c FROM hits GROUP BY ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3 ORDER BY c DESC LIMIT 10 diff --git a/particledb/results/c8g.metal-48xl.json b/particledb/results/c8g.metal-48xl.json new file mode 100644 index 000000000..840325783 --- /dev/null +++ b/particledb/results/c8g.metal-48xl.json @@ -0,0 +1,57 @@ +{ + "system": "ParticleDB", + "date": "2026-03-29", + "machine": "c8g.metal-48xl", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust", "column-oriented", "HTAP", "Arrow"], + "load_time": 11.623, + "data_size": 35628268394, + "result": [ + [0.000087, 0.000018, 0.000045], + [0.008025, 0.004177, 0.003544], + [0.000054, 0.000026, 0.000021], + [0.000017, 0.000014, 0.000015], + [0.135465, 0.12466, 0.119157], + [0.000092, 0.00002, 0.000017], + [0.000028, 0.000021, 0.00002], + [0.00734, 0.003626, 0.003122], + [0.5341, 0.541146, 0.532247], + [0.576007, 0.564796, 0.567862], + [0.208625, 0.195047, 0.192445], + [0.190483, 0.194358, 0.209001], + [0.19331, 0.182947, 0.175445], + [0.51716, 0.512027, 0.533358], + [0.138362, 0.123267, 0.127064], + [0.218279, 0.197991, 0.191352], + [0.459144, 0.452645, 0.476103], + [0.017045, 0.019432, 0.017866], + [0.896431, 0.838977, 0.877905], + [0.007854, 0.007529, 0.007746], + [0.113262, 0.099522, 0.11351], + [0.073453, 0.068612, 0.068322], + [0.09526, 0.083284, 0.078921], + [0.001167, 0.000535, 0.00033], + [0.010094, 0.011427, 0.011186], + [0.000978, 0.000599, 0.000467], + [0.06891, 0.064063, 0.063104], + [0.232303, 0.207474, 0.192769], + [0.000147, 0.000062, 0.000052], + [0.290745, 0.322869, 0.312398], + [0.003445, 0.001895, 0.001739], + [0.001361, 0.001145, 0.001087], + [0.177206, 0.169217, 0.161157], + [0.178735, 0.17316, 0.182612], + [0.036864, 0.034299, 0.032053], + [0.031121, 0.023514, 0.025791], + [0.058985, 0.028777, 0.027129], + [0.051209, 0.046995, 0.047426], + [0.021211, 0.016977, 0.016305], + [0.017753, 0.012195, 0.013155], + [0.01892, 0.018085, 0.019493], + [0.287562, 0.166609, 0.160801], + [0.213423, 0.195805, 0.181605] + ] +} diff --git a/particledb/run.sh b/particledb/run.sh new file mode 100755 index 000000000..cf7b6d55e --- /dev/null +++ b/particledb/run.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# ParticleDB ClickBench Runner +# +# Each query is executed 3 times; the test reports cold (run 1) and hot +# (best of runs 2-3) timings along with a full submission JSON. + +set -euo pipefail + +echo "Ensure hits.parquet is at benchmarks/clickbench/data/hits.parquet" +echo "" +echo "Running benchmark..." + +CLICKBENCH_MACHINE="${CLICKBENCH_MACHINE:-c8g.metal-48xl}" \ + cargo test -p spanner-integration-tests --release test_clickbench_real_hits -- --nocapture 2>&1 | tee /tmp/clickbench_results.log + +# Extract the submission JSON +echo "" +echo "Extracting submission JSON..." +mkdir -p results +sed -n '/CLICKBENCH_SUBMISSION_JSON_START/,/CLICKBENCH_SUBMISSION_JSON_END/p' \ + /tmp/clickbench_results.log | grep -v 'CLICKBENCH_SUBMISSION_JSON' > results/c8g.metal-48xl.json +echo "Results written to results/c8g.metal-48xl.json" diff --git a/particledb/template.json b/particledb/template.json new file mode 100644 index 000000000..50e674a48 --- /dev/null +++ b/particledb/template.json @@ -0,0 +1,10 @@ +{ + "system": "ParticleDB", + "date": "2026-03-29", + "machine": "c8g.metal-48xl", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust", "column-oriented", "HTAP", "Arrow"] +}