---
title: "ClickHouse Newsletter February 2023: A ‘Sample’ of What’s Happening in the Community"
description: "ClickHouse's SAMPLE BY clause trades exact answers for speed on very large tables, illustrated with a 425-billion-row Wikistat dataset."
url: "https://swe.quest/articles/clickhouse-newsletter-february-2023-a-sample-of-what-s-happening-in-the-9cf1bfd9f4573dfb"
canonical: "https://clickhouse.com/blog/newsletter_2023_february"
source: "ClickHouse"
published: "2023-02-15"
difficulty: "medium"
kind: "Article"
reading_minutes: 9
tags: ["analytics","sql","performance"]
---

# ClickHouse Newsletter February 2023: A ‘Sample’ of What’s Happening in the Community

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2023-02-15, 9 min read, Article. Original: [https://clickhouse.com/blog/newsletter\_2023\_february](https://clickhouse.com/blog/newsletter_2023_february)

## Summary

ClickHouse's SAMPLE BY clause trades exact answers for speed on very large tables, illustrated with a 425-billion-row Wikistat dataset. A full-table monthly average took about 278 seconds. Taking the first million rows was fast but biased, while a table with a hashed sampling key (cityHash64(path)) placed first in the ORDER BY answered from a 1% sample in about 6 seconds with reasonable accuracy. Sums must be scaled up by the sampling factor. The newsletter also lists upcoming webinars and meetups, recaps 23.1 features (experimental inverted indices, parameterized views, query result cache) and links recent blog posts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- ClickHouse MergeTree tables ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse, SAMPLE BY, MergeTree, cityHash64, Wikistat, ClickHouse 23.1

## Related posts

- [Native random sampling in ClickHouse](https://swe.quest/articles/native-random-sampling-in-clickhouse-b04e18e64b8c1545.md): ClickHouse · 2026-05-22 · Medium · 11 min read · Analytics & OLAP, Query engines, Performance engineering, SQL
  ClickHouse's SAMPLE clause runs aggregations over a deterministic subset of rows selected by a hash-based sample key, which must be part of the primary key so granules above the hash threshold can be skipped.
- [ClickHouse and The One Billion Row Challenge](https://swe.quest/articles/clickhouse-and-the-one-billion-row-challenge-a492ebece6e75794.md): ClickHouse · 2024-01-23 · Medium · 8 min read · Analytics & OLAP, SQL, Performance engineering
  ClickHouse Local solves the One Billion Row Challenge (min/mean/max temperature per station from a 13GB text file) in about 20 seconds on an 8-core Hetzner VM, versus nearly 3 minutes for the Java baseline.
- [ClickHouse Over the Years with Benchmarks](https://swe.quest/articles/clickhouse-over-the-years-with-benchmarks-4ccceaaaa0dadc4e.md): ClickHouse · 2022-06-14 · Medium · 17 min read · Analytics & OLAP, Performance engineering, Databases
  Every ClickHouse release from 1.1.54378 (April 2018) onward was installed on one AWS m5.8xlarge and run through the Star Schema Benchmark, the Brown University benchmark and ClickHouse's own hits benchmark to see how performance changed over time.
- [How to take random samples from big PostgreSQL tables](https://swe.quest/articles/how-to-take-random-samples-from-big-postgresql-tables-9724e6f9679558c6.md): Render · 2024-06-13 · Medium · 10 min read · PostgreSQL, SQL, Performance engineering, Query engines
  Random sampling from billion-row PostgreSQL tables with ORDER BY random() scans every row and runs a top-N heapsort, taking over a minute.
- [ClickHouse Release 23.8](https://swe.quest/articles/clickhouse-release-23-8-8db1ebb65d969c75.md): ClickHouse · 2023-09-15 · Medium · 10 min read · Analytics & OLAP, Query engines, Data pipelines, Performance engineering
  ClickHouse 23.8 makes file reads much faster by using Parquet row-group min/max statistics to skip data, answering count() from file metadata, and pruning files via the \_file virtual column without reading them.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
