3 ms·
[Cockroach Labs engineer here, I worked on statistics] All table statistics are stored in a system table (system.table_statistics). CREATE STATISTICS scans the
by radub 8y ago
[Cockroach Labs engineer here, I worked on statistics]
All table statistics are stored in a system table (system.table_statistics). CREATE STATISTICS scans the table, calculating statistics on a column, and adds a new row to system.table_statistics.
We still have a ways to go in making statistics automatic (right now it requires a manual call to CREATE STATISTICS) and more useful to the optimizer (which currently only uses basic stats). We're working on that right now for the 2.2 release.
- Lemaxoxo 8y agoAre you planning to support multivariate statistics?
- radub 8y agoWe plan to support cardinality estimations for multiple columns. Other than that there are no plans for multivariate stats in the near future.
- SaifAlHarthi 8y agoWhat if the tables were partitioned, do you calculate local statistics or you aggregate the stats and expose it to the optimizer?