Hi,
In general, you can store the frequently accessed query result as Summaries. Summaries have some advantages over the traditional cache:
* Summaries are transparent to the user. Unlike with caching, you do not need to create a view to cache a data set. The query optimizer will automatically analyze if it can rewrite the incoming queries to take advantage of the data in the summary without the user being aware of its existence.
* Summaries are not restricted to the data source configured for caching. This means that you can create as many summaries as you want for the same view/view in different data sources.
Please be informed that usually the aggregation functions are considered costly. Because when you have huge volume of data and the query cannot be delegated, Denodo has to fetch all the records and apply group by in virtual layer.
With summaries, this process is simplified. It will directly fetch the result from summary table and apply any additional operation in virtual layer. The important thing to note here is that Denodo will see if the end user query can be resolved with the data stored in summary and then it will use those data. If any other operations like filter or join required, it will be done after that.
For your scenario, we also suggest you to refer to Execution Trace to know more detailed information.
For further clarifications, please refer to the following documents,
* [Summary Rewrite Optimization](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/optimizing_queries/summary_views/summary_rewrite_optimization/summary_rewrite_optimization)
* [Best Practices to Maximize Performance II: Configuring the Query Optimizer](https://community.denodo.com/kb/en/view/document/Best%20Practices%20to%20Maximize%20Performance%20II%3A%20Configuring%20the%20Query%20Optimizer#h.ewii931kf272)
Hope this helps!