ClickHouse: Release 22.8 Webinar

ClickHouse
Release 22.8

Release 22.8 Webinar

1. (45 min) What's new in ClickHouse 22.8.

2. (15 min) Q&A.

🌤

Release 22.8

ClickHouse LTS release.

Supported until August 2023.

Version 21.8 reached end of life.

— 12 new features

— 12 performance optimizations

Self-Extracting Executable

The most simple way to install ClickHouse:

curl https://clickhouse.com/ | sh

Single binary package. Installs the latest version. Includes debug info.

Works on every Linux (x86_64, aarch64, powerpc64le),
macOS (x86_64, M1), FreeBSD and Windows (WSL2).

Was: 2.1 GB.

Now: 446 MB, takes ~5 seconds to decompress on first run.

Developer: Arthur Filatenkov, Yakov Olkhovskiy.

Extended Range For Date&Time

Supported range for DateTime64 and Date32 data types:

Was: 1925–2283.

Now: 1900–2300.

Uses proleptic Gregorian calendar.

Motivation: store dates of birth of the customers.

Developer: Roman Vasin.

Query Parameters In Interactive Mode

... and in the native protocol

demo

Developer: Nikita Taranov.

Exact Rows Before LIMIT

SET exact_rows_before_limit = 1

demo

Developer: Kevin Wan.

Distributed INSERT SELECT FROM s3Cluster

SELECT * FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/ wikistat/partitioned/wikistat*.native.zst'); SELECT * FROM s3Cluster('default', 'https://clickhouse-public-datasets.s3.amazonaws.com/ wikistat/partitioned/wikistat*.native.zst'); INSERT INTO wikistat SELECT * FROM s3Cluster( 'https://clickhouse-public-datasets.s3.amazonaws.com/ wikistat/partitioned/wikistat*.native.zst');

If the target table is Replicated or Distributed
the INSERT will be distributed across the cluster.

Developer: Nikita Mihailov.

JSON Server Log Format

Simply write server logs in JSON.

demo

Developer: Mallik Hassan.

SELECT INTO OUTFILE AND STDOUT

Print the result and save it.

demo

Developer: Smita Kulkarni.

SELECT INTO OUTFILE AND STDOUT

Print the result and save it.

Todo:

— INSERT ... AND SELECT?
— INSERT RETURNING?

DELETE Query

SET mutations_sync = 1; ALTER TABLE hits DELETE WHERE Title LIKE '%Mongo%';

— 205 sec (for a table with 100 million records).

DELETE FROM hits WHERE Title LIKE '%Mongo%';

— ??? sec.

Developers: Jianmei Zhang, Alexander Gololobov.

Compatibility Of AggregateFunction States

Different aggregate functions can have compatible states.

Compatible states can be inserted into a table with a column of AggregateFunction type.

Helps for materialized views and projections.

Example: avg(price) and avgIf(price, category = 'flowers')

Example: quantile(0.5)(timing) and quantiles(0.5, 0.9)(timing)

demo

Developers: Amos Bird.

ClickFiddle

A tool to check old ClickHouse versions:
https://fiddle.clickhouse.com/

It allows read/write queries, creating the tables, etc.

Developers: Igor Baliuk.

What Is It?

It is small and it runs ClickHouse. Link

Q&A