Federated cache for federated three-part names
The federated cache is a catalog cache that stores metadata and statistics for remote objects.
When you issue an SQL statement against a remote table or view that is referenced by a federated three-part name, the metadata and statistics for the remote object are stored in the federated cache on the first reference. Subsequent queries that reference the same three-part name, in the same session or in other sessions, will obtain metadata directly from the federated cache.
The metadata information in a cache entry is associated with an expiration duration. The expiration duration is the interval at which the metadata is considered valid and up-to-date since it was loaded from a remote server. The default value of the expiration duration is zero (0). A zero value means that metadata is always considered validated, unless you choose to explicitly invalidate the data.
You can change the interval value by setting the environment variable FEDCACHE_EXPIRE_INTERVAL. You specify this value in units of seconds.
Recommendation: Set the FEDCACHE_EXPIRE_INTERVAL variable in the db2dj.ini file.
Examples
- To invalidate specific three-part name metadata:
FLUSH FEDERATED CACHE FOR rudb.rschema.t1
- To invalidate all three-part name metadata in a specific schema
named rschema:
FLUSH FEDERATED CACHE FOR rudb.rschema.*
- To invalidate all three-part name metadata in a specific server
named rudb:
FLUSH FEDERATED CACHE FOR rudb.*.*
- To flush a server named rudb:
FLUSH FEDERATED CACHE FOR SERVER rudb