Agile performance - Cache at View Level

In the previous section you activated the cache module in your Denodo server. Now, you need to configure your views to make use of the cache.

For example, let's activate the cache in the "client_with_bills" view. We have two main reasons to select this view as a cached view:

  • It queries two data sources (a MySQL database and a SOAP Web Service).
  • Usually Web Service response times are worse than traditional databases response times.

How to activate cache for a view

Please, follow these steps:

  1. In the Elements Tree, double-click on the view name. The view schema will show in the Workspace.
  2. Click on the "Advanced" button in the bottom of the Workspace.
  3. Check Cache mode: Partial. It will enable the cache.
  4. Leave the rest of fields with the default values.
  5. Finally, click "Ok".

Now, you can test if the cache works as expected performing the following test:

  1. Open Tools > VQL Shell.
  2. Execute the following query: select * from client_with_bills trace
  3. After the execution, click on "Execution trace" button to see the query execution plan. You can see that the data comes directly from the different data sources.
  4. Click "Ok" and execute the same query again.
  5. Click on the "Execution trace" button. You can see that the data comes from the cache (displayed with a box a icon) and the execution time of the query is faster.

In the next section you will learn more about the available cache modes. In the above example, you configured the view to use Partial mode, check the next section to know the behavior of the Partial mode.