CacheMetadata
Determines whether the provider caches table metadata to a file-based cache database.
Data Type
bool
Default Value
false
Remarks
When this connection property is set to True, as you execute queries, table metadata in the Amazon Redshift catalog is cached to the cache database specified by CacheConnection and CacheProvider, or, if those connection properties are not set, to the user's home directory.
The location of your home directory varies by platform:
Platform | Home Directory |
Windows | %APPDATA%\\CData\\Redshift Data Provider |
Mac | ~/Library/Application Support/CData/Redshift Data Provider |
Unix | ~/.config/CData/Redshift Data Provider |
When to Use CacheMetadata
When there are a large number of Amazon Redshift tables and columns for the add-in to retrieve during metadata discovery, the add-in may take a while to list all table metadata.
You may experience slow metadata retrieval when:
- Your Amazon Redshift instance naturally has a large table count.
- The add-in has been configured, via its connection properties, to discover more tables than it would under its default configuration.
- You make many short-lived connections to the add-in.
When Not to Use CacheMetadata
The add-in automatically persists metadata in memory for up to an hour when you first discover the metadata for a table or view, so CacheMetadata is generally not necessary.
CacheMetadata is not ideal in scenarios where you are working with volatile metadata. The first time you query a table, the add-in caches its metadata to the cache database file. This cache is not dynamically updated to reflect updates to the table schema, so you must delete and rebuild the cache database file to pick up new, changed, or deleted columns.