[SOL-577] Column statistics Created: 29.09.2017 Updated: 29.07.2020 Resolved: 29.07.2020
|Affects Version/s:||EXASOL 6.0.0, EXASolution 5.0.0, Exasol 6.2.x|
|Reporter:||Captain EXASOL||Assignee:||Captain EXASOL|
Note: This solution is no longer maintained. For the latest information, please refer to our documentation:
Exasol database automatically computes and stores column statistics on demand, e.g. when joining tables for the first time. Those statistics consist of distinct estimates, minimum & maximum values, balancing, and other information. They are used by our query optimizer for estimation of join costs, filter sensitivities, etc.
The computation of column statistics performs a complete column scan. Therefore it might be expensive, especially for large tables and/or tables not having all data in memory. This means that a query doing statistics computation may experience a significant slow down compared to the next execution.
Column statistics are maintained as part of DML statements. They are recomputed if a significant amount of data has been changed since the last computation.
Due to format changes, all column statistics are invalidated during an update from EXASOL 5.0 to EXASOL 6.0.
After the update to EXASOL 6.0, we recommend to recompute the statistics for the whole database to avoid any potential unexpected performance losses. Please note that the following command is introduced with version 6.0.4 (see ---
ANALYZE DATABASE REFRESH STATISTICS;
Alike other multi-table statements, ANALYZE DATABASE does an implicit COMMIT after each table minimizing transaction conflicts.
It is often useful to obtain a estimate on the duration of the ANALYZE DATABASE REFRESH STATISTICS statement.
The query below delivers such an estimate (measured in seconds) when run before the update (that is, on EXASOL 5.0, while statistics are still valid):
|Category 1:||Database Administration - Performance|