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
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:
- In the Elements Tree, double-click on the view name. The view schema will show in the Workspace.
- Click on the "Advanced" button in the bottom of the Workspace.
Cache mode: Partial. It will enable the cache.
- Leave the rest of fields with the default values.
- Finally, click "Ok".
Now, you can test if the cache works as expected performing the following test:
Tools > VQL Shell.
- Execute the following query:
select * from client_with_bills trace
- 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.
- Click "Ok" and execute the same query again.
- 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.