shlogg · Early preview
Franck Pachot @franckpachot

Maintaining Approximate Aggregates With Fast Query And Low Overhead

Maintain an approximate aggregate with fast query & low overhead on DML using indexes, ideal for big tables where exact count takes minutes

In this new series I'll look at using indexes where you may have thought about a fast refresh on commit materialized view. Because indexes can do a lot more than what you think. This post is about maintaining automatically an approximate aggregate (count, min, max) with fast query and low overhead on DML.
When you want to count the rows of a big tables, it has to scan all rows. Even it the count can be pushed down in YugabyteDB, this is still a lot of work.
I create and load a large table. If you want to try it, you can already create the index that I define later, because it is easier faster...