Blog

In the paper's tests on 105 core WeChat metrics, the BSI design reduced the storage of 29 days of data by 60%, made per-user sums up to about 100 times faster, and cut average ad-hoc query time from 22.3 seconds to 6.0 seconds. Drawing on production experience with roughly 100,000 metrics and hundreds of ClickHouse nodes, this post explains bucketing and position encoding, suitable workloads, SQL rewrites, and pre-aggregation with NumericIndexedVector. These measurements come from the internal system; the community implementation has not been benchmarked separately.

#ClickHouse#BSI#Bitmap#Software Engineering

A bitmap records which keys exist, but cannot directly store each key's dwell time, amount, or other numeric value. NumericIndexedVector represents these values with a group of RoaringBitmaps and supports arithmetic, comparison, and aggregation by key. This post introduces BSI encoding through a small example, explains the operations, and examines the ClickHouse implementation's choices for multiplication and division, 32-bit indexes, and zero-valued keys. I developed this feature and contributed it to the ClickHouse community after the implementation had already been running at scale inside WeChat for more than a year.

#ClickHouse#BSI#Bitmap#Software Engineering

A higher metric in an A/B experiment's treatment group does not by itself establish that a new version works: the difference reflects both the version effect and random variation. Starting from the potential outcomes framework, this post explains why random assignment lets the difference in group means estimate the version effect, then introduces p-values, confidence intervals, statistical power, and sample size. It closes with common practices that affect conclusions: changing assignment ratios, checking results daily and stopping on significance, and treating repeated records from the same user as independent samples.

#Statistical Inference#Causal Inference#A/B Testing#Hypothesis Testing