Autocaching in Data Virtualization
Autocaching improves query performance by automating the entire cache lifecycle from creating to deleting caches.
Autocaching improves the performance of your queries by automatically caching the results of frequently used queries, based on the cache recommendations that the cache recommendation engine provides. Autocaching also evicts old caches if they are no longer beneficial.
With this feature, you can customize the following settings:
- The name of each auto-generated cache.
- How often autocaching runs.
- The amount of storage space that caches can occupy.
- The type of queries in your workload that you want autocaching to analyze.
Autocaching is disabled by default and you can enable it. For more information, see Enabling autocaching in Data Virtualization.
Creation and eviction model
Autocaching creates the top 10 most critical caches recommended by the cache recommendation
engine. Autocaching only evicts auto-generated caches and does not delete user-defined caches,
however you can always delete or disable auto-generated caches.
- Autocaching generates caches based on the following criteria:
-
- If the engine recommends 10 or fewer caches, autocaching creates all of them.
- If the engine recommends more than 10 caches, autocaching creates the first 10 and saves the
remaining caches for the next run, as long as the recommendations remain the same and in the same order
- If the recommendations remain the same in the next run, autocaching creates the remaining caches.
- If the recommendations change, autocaching follows the new list and creates the first 10 caches.
- For example: If the cache recommendation engine recommends 15 caches to create, autocaching creates the first ten in the initial run. If in the next run, the recommendation engine recommends the same 15 caches, then autocaching creates the remaining five caches.
- Autocaching never creates duplicate caches, even if the recommendation engine suggests the same cache multiple times.
- Autocaching evicts auto-generated caches based on the following criteria:
-
- Auto-generated caches that failed to be created.
- Auto-generated caches that have not been used for at least 15 days.
- Autocaching does not have enough storage available, which is defined by the storage limit
parameter in the autocaching settings.
- In this case, autocaching first evicts caches that the cache recommendation engine no longer recommends. Afterwards, autocaching evicts caches starting from the lowest-ranked to the higher-ranked ones until there is enough storage space.
To learn more about the cache recommendation engine, see Cache recommendations in Data Virtualization.