Metadata Cache
The metadata cache is used internally in DbVisualizer to speed up various features such as auto-completion, table data editing, and for functions that gather information about columns, keys, tables, etc. The cache keeps only metadata such as schema, table, and column names. It does not store table data or other sensitive information.
Configuring the Metadata Cache
The metadata cache can be set to any of these modes:
- Persistent (default)
the metadata is stored in a local cache and is reused for new sessions - Transient
metadata is cleared for each new session - Disabled
the cache is not used at all
When the cache is Persistent, you can specify the number of days to keep stale (unused) contents.
You find the setting for the metadata cache in Tools → Tool Properties and in the Database Connection / Metadata category.
Refresh the Metadata Cache
When metadata has been changed outside DbVisualizer or via scripts, you may need to refresh the cache and reload metadata. This can be done for all connections, for a single connection, or for some elements of a connection.
Using the File Menu
Use File → Clear Cache to clear any of the listed connections, or the entire cache (Clear All). When prompted, you should normally select to Clear the cache; the choice Reset will remove and recreate the metadata cache and should only be used when there are issues with the cache.
Using the Object Tree
Qualifiers (catalogs and schemas) are refreshed when you select Refresh Object Tree from the right-click menu; this will also update the database/schema drop-downs in the SQL Commander.
Using the Auto-Complete Popup
The auto-complete window in an SQL Commander has a button to refresh the metadata cache for the actual database. This might be handy in case there is a discrepancy between what is displayed in the auto-completion window and the actual data source, and you want to keep the popup open.
You can refresh metadata in several ways; by default the refresh button will refresh the contents currently showing in the popup (e.g. tables or columns), but using the drop-down you can choose to refresh tables, columns, catalogs or schemas, or to clear the cache (the same way as on the File menu). Items are enabled/disabled depending on the cursor position, the connected database, and whether the cache is enabled.