0 / 0
Managing data caches and queries in Watson Query

Managing data caches and queries in Watson Query

Watson Query Managers can cache a query to save its data results and optimize query performance.

About this task

In Watson Query, you can virtualize remote data sources so that data can remain remote while it is accessed through a single framework. For example, you can virtualize tables across different remote databases, and you can run queries that can join these tables. To avoid query executions that are time-consuming, Watson Query Managers can create caches to improve performance by caching the result sets of your queries.

Managing caches

On the Cache management page, a Watson Query Manager can monitor storage and responsiveness of your data caches.
  • In the Cache storage chart bar, you can view the total amount of cache storage that you allocated during provisioning. You can also monitor the amount of storage that is used by both active and inactive data caches. Active data caches are used in query optimization.
  • In the Responsiveness bar chart, you can monitor how many queries ran in a specific execution time period. You can also compare the responsiveness of queries that use data caches and queries that do not use data caches.

In the Active data caches tab of the Cache management page, you can get a list of active data caches that you can manage. Additionally, you can see the number of total hits of a cache. The Responsiveness bar chart provides usage information in a specific period of time, while the Total hits column in Active data caches shows you the overall number of hits an active cache received.

Watch the following video for an overview of cache management in Watson Query.

This video provides a visual method as an alternative to following the written steps in this documentation.

Adding and editing caches

To add a data cache entry, see Adding data caches.

To view details of a cache, follow these steps.

  1. Go to Data > Data virtualization > Virtualization > Cache management.
  2. Go to the action menu of the cache and click View cache details.

To edit data caches, follow these steps.

  1. Go to the action menu of an active cache and click Edit name.
    Note: You can't edit a cache until it is active.
  2. Enter a new name for your cache and click Apply.

Refreshing a cache

To edit the cache refresh schedule, follow these steps.

  1. Go to the action menu of an active cache and click Edit refresh rate.
    Note: You can't edit a cache until it is active.
  2. Set a refresh rate for the cache.
    A frequent refresh prevents the cache from becoming stale in time. You can set a refresh to run as scheduled. Select an interval and specify details.
    • None, manual only: If you select this option, you can refresh the cache manually by using the action menu.
    • Minutes: Select the interval in minutes to refresh your cache. For example, you can refresh every 15 minutes.
    • Hourly: Select time (minute) of the hour to refresh your cache. For example, you can refresh every hour at the 30 minutes past the hour.
    • Daily: Select time of the day to refresh your cache. For example, you can refresh every day at 12:00 AM.
    • Weekly: Select days of the week and time of the day to refresh your cache. For example, you can refresh every Monday, Wednesday, and Friday at 12:00 AM.
    • Monthly: Select weeks of the month, days of the week, and time of the day to refresh your cache. For example, you can refresh on the first day of the month at 12:00 AM.
  3. Click Apply.
To refresh a cache manually, go to the action menu of an active cache and click Refresh now.
Note: You can't refresh a cache until it is active.

Deactivating, deleting, and re-creating caches

To deactivate an active cache, go to the action menu of the cache and click Deactivate.

To delete a data cache, click Delete the action menu of the cache.

To re-create a deleted data cache, click Inactive data caches > Deleted caches. In the action menu of the cache you want to re-create, click Recreate cache.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more