Automatic Table Statistics in CockroachDB

1 · CockroachDB · May 9, 2019, midnight
Last year, we rebuilt our cost-based optimizer from scratch for CockroachDB’s 2.1 release. We’ve been continuing to improve the optimizer since then, and we’ve added a number of new features for the CockroachDB 19.1 release. One of the new features is automatic collection of table statistics. Automatic statistics enables the optimizer to make better decisions when choosing query plans. This post explains why statistics are important for the optimizer and describes some of the challenges we overc...