You can translate the question and the replies:

Partial Cache not working

I have created a derived view ('client') on the top of a Excel and partial cache mode is on. Now I am trying to check how partial cache works.Initially I have around 10 rows. I have also created a base view on the top of cache database. I am executing some queries in VQL shell mode. So after first execution all 10 rows I can see in cache database. Query 1 : select * from client I have now included one more row in my source with id 11. I am now running query it does not go to source to check if data has been updated or not, even I have tried to include the where clause where id = 11 as well , but partial cache does not invoke the data source trip. I am using DENDO EXPRESS. Please Link : https://community.denodo.com/tutorials/browse/basics/5cache3types
user
11-06-2018 11:17:21 -0400

2 Answers

Hi, I believe there's a misconception here about how Partial Cache is designed to work. When you send a query to a view configured with Partial Cache, Denodo will store in the cache that query and its results. When a new query comes in, Denodo will check in the cache if that query (or a subset of it) has been executed in the past, and if it has, it will retrieve the cached results instead of accessing the original sources in real time. In your case, the first time you send the "Query 1" (`SELECT * FROM client`), Denodo will access the cache to see if that query has been run first. Because it hasn't, it will go and fetch the results from the real source (Excel, 10 rows) and it will store them in the cache. The next time you run the same query, Denodo will just fetch those results from the cache, without accessing the Excel doc. Your second query, `SELECT * FROM client WHERE id = 11`, is a subset of the first one, meaning Denodo can resolve the same query accessing the cached result set and applying the extra filters (`WHERE id = 11`) on top. In this case, Denodo will get the cached data (10 rows) and apply the WHERE condition on it, and that's why you're not seeing the new row added to the Excel document. If your first query was `SELECT * FROM client WHERE id = 1`, then when issuing the second query (`WHERE client = 11`), Denodo would go to the original source, as that query is "unknown" to it. For more details about Partial Caching, see more here: https://community.denodo.com/docs/html/browse/7.0/vdp/administration/cache_module/cache_modes/partial_mode#partial-mode
Denodo Team
12-06-2018 09:18:14 -0400
Formatted inline: Hi, I believe there’s a misconception here about how Partial Cache is designed to work. When you send a query to a view configured with Partial Cache, Denodo will store in the cache that query and its results. When a new query comes in, Denodo will check in the cache if that query (or a subset of it) has been executed in the past, and if it has, it will retrieve the cached results instead of accessing the original sources in real time. In your case, the first time you send the “Query 1” (**SELECT * FROM client**), Denodo will access the cache to see if that query has been run first. Because it hasn’t, it will go and fetch the results from the real source (Excel, 10 rows) and it will store them in the cache. The next time you run the same query, Denodo will just fetch those results from the cache, without accessing the Excel doc. Your second query, **SELECT * FROM client WHERE id = 11**, is a subset of the first one, meaning Denodo can resolve the same query accessing the cached result set and applying the extra filters (**WHERE id = 11**) on top. In this case, Denodo will get the cached data (10 rows) and apply the WHERE condition on it, and that’s why you’re not seeing the new row added to the Excel document. If your first query was **SELECT * FROM client WHERE id = 1**, then when issuing the second query (**WHERE client = 11**), Denodo would go to the original source, as that query is “unknown” to it. For more details about Partial Caching, see more here: https://community.denodo.com/docs/html/browse/7.0/vdp/administration/cache_module/cache_modes/partial_mode#partial-mode
Denodo Team
12-06-2018 09:20:31 -0400
You must sign in to add an answer. If you do not have an account, you can register here