Expression-based indexes and automatic statistics collection

With automatic statistics collection, you can allow the database manager to determine whether to update the statistics for a table, including a table with expression-based indexes. The auto_runstats database configuration parameter and real-time statistics (rts) feature are enabled by default when you create a database.

The auto_runstats database configuration parameter and the rts feature apply the statistics profiles in the same manner as a manually issued RUNSTATS command. They apply the statistics profile of the statistical view if the following conditions are met:
  • A statistical view with a statistics profile.
  • A base table with a statistic profile.
  • A base table that includes an expression-based index.
Neither the auto_runstats database configuration parameter nor the rts feature act directly on the automatically generated statistical view. The statistical view statistics are gathered when the auto_runstats database configuration parameter and the rts feature act on the table itself. The statistical view statistics are gathered regardless of whether statistics profile exist on the table or on the associated statistical views.

The rts feature does not fabricate statistical view statistics for the expression-based index.