Updating statistics on materialized query tables
For optimal performance of materialized query tables, you need to provide Db2 with accurate catalog statistics for access path selection.
About this task
When you run the REFRESH TABLE
statement, the only statistic that Db2 updates
for the materialized query table is the cardinality statistic.
Procedure
To keep catalog statistics current for materialized query tables:
Run the RUNSTATS utility after executing a REFRESH TABLE
statement or after changing the materialized query table significantly.
Otherwise, Db2 uses
default or out-of-date statistics. The estimated performance of queries
that are generated by automatic rewrite might inaccurately compare
less favorably to the original query. 