Every Millisecond Counts

What happened
The ClickHouse query behind our app's first screen took 85 seconds. A partition key, a sorting key, one precomputed column, flat query templates, and a big update. It ended up more than 200x faster.
Summary assembled by rule from the sources below