ClickHouse Newsletter July 2023: Seeing Clearly
ClickHouse v23.6 adds 10 features, 12 performance optimisations and 31 bug fixes. Highlights include exploiting natural sort order in almost-sorted columns that aren't in the ordering key, MongoDB integration support up to v6, and a transform function that now works with all data types. The query of the month uses the windowFunnel function on the GitHub Events dataset for a fork-to-PR funnel analysis. About 17% of ClickHouse forkers open a PR within 30 days, which ranks 22nd among repositories with more than 25k stars and 5k forks. The rest of the issue is links and upcoming meetups and trainings.
Related posts
- ClickHouse Release 23.6
ClickHouse mediumAdept
ClickHouse 23.6 ships 10 new features, 12 performance optimisations and 31 bug fixes. The MongoDB table function and engine now support Mongo up to v6 after protocol changes in 5.1, with filter pushdown and examples for querying Atlas and migrating collections into MergeTree. Decimal128 and schema inference are not yet supported. The transform function now works across all data types, including DateTime64, Decimal and Null handling, and queries can now exploit natural sort order in columns that are mostly monotonically increasing but not part of the ordering key.
- ClickHouse Newsletter March 2023: Contributing to ClickHouse
ClickHouse mediumAdept
ClickHouse v23.2 ships 18 new features, 30 performance optimisations and 43 bug fixes, headlined by multi-stage PREWHERE, read support for Apache Iceberg v1 tables, and correlation matrix computation. The featured query counts cumulative unique contributors to ClickHouse repositories from GitHub events. A first version uses groupArrayDistinct with a window function over monthly arrays. A more concise version passes uniqState sketches from a subquery and merges them cumulatively with uniqMerge in a window, cutting runtime from 32ms to 24ms. The issue closes with a reading list and upcoming webinars and meetups.
- ClickHouse Release 23.2
ClickHouse mediumAdept
ClickHouse 23.2 ships 18 features, 30 performance optimisations and 43 bug fixes. Its headline change is multi-stage PREWHERE, which filters columns from smallest to largest uncompressed size so that each step narrows the granules scanned by the next. It is enabled with enable_multiple_prewhere_read_steps=1, ideally alongside move_all_conditions_to_prewhere. The release also adds read support for Apache Iceberg v1 via the iceberg table function and engine (latest snapshot only for now), a corrMatrix aggregate for Pearson correlation matrices, Kafka Connect Sink compatibility with Amazon MSK, and a GA Metabase plugin.
- Building a product analytics solution with ClickHouse
ClickHouse mediumAdept
ClickHouse's in-house product analytics platform, Galaxy, stores over 20 billion events (14 TB, roughly 14x compression) in a single denormalized MergeTree table keyed on created_at. A single sparse table avoids join overhead, since ClickHouse's sparse serialization makes empty columns cheap. Columns used for cohorts and filters should be top-level rather than buried in a JSON payload. Incremental materialized views speed up the few dozen recurring queries, and a custom SDK handles event capture.
- ClickHouse Release 23.10
ClickHouse mediumAdept
ClickHouse 23.10 ships 23 new features, 26 performance optimisations and 60 bug fixes. Highlights include a largestTriangleThreeBuckets aggregate for downsampling time series while preserving local minima and maxima, demonstrated on the SF Bay Area Bike Share dataset. Also new are arrayFold, a left-fold higher-order array function, shown reconstructing versioned text from per-line change history, and native ingestion of Numpy .npy files, which lets LAION embeddings be joined with Parquet metadata using clickhouse local instead of Python. Smaller additions include SHOW MERGES/SHOW SETTINGS, jsonMergePatch, formatQuery, argMin/argMax combinators and tables without a primary key.