The object use count cache, or OUC cache, tracks object access use counts, UDI (UPDATE, DELETE, INSERT) counts, and statistics access counts for DML requests made against the database.
- Query optimization
- Performance monitoring
- Database object optimization
- Statistics management
Because only table-level insert and delete UDI counts are needed for cardinality estimation, Vantage records that information in the OUC cache. Column-level update counts are only needed when the Optimizer is deciding whether a COLLECT STATISTICS request can be skipped for failing to meet one or more USING thresholds, so column-level update counts are only retrieved when necessary.
When flushing the OUC cache, Vantage writes its data to the dictionary table DBC.ObjectUsage. See DBQLRulesV for the definition of the ObjectUsage table.
- Table
- View
- Macro
- Trigger
- Join index
- Statistics
- Delete
- Insert
- Update
Flushing the OUC Cache to Disk
- When a high amount of activity occurs on a set of database objects.
Flushing the cache based on high activity is necessary to avoid accumulating stale counts in DBC.ObjectUsage. Fresh use counts are important for determining when statistics need to be recollected.
High activity cache flushing is particularly useful after bulk load jobs where table cardinalities can change radically in a short period of time. For example, the OUC cache is flushed immediately after FastLoad and MultiLoad jobs complete.
- When the Optimizer makes a specific request to flush the cache.
This is called on-demand flushing.