You can translate the question and the replies:

statistics on derived views vs base views

when calculating the statistics of a view is it better to do that on a derived view or do I also need to do it on the base views that make the derived view
user
01-06-2018 14:42:59 -0400
code

1 Answer

Hi In order to allow cost-based optimization of the query, you need to gather the statistics on the base views. This is because the cost-based optimization needs the statistics of at least all the base views participating in the query (the average size of a field, the maximum and minimum values, the number of distinct values, etc.) to estimate the cost of prospective execution plans. To understand why the statistics are important in the cost-based Optmization process, see section ‘Collecting Statistics’ of the [Denodo Query Optimizations for the Logical Data Warehouse](https://community.denodo.com/kb/view/document/Denodo%20Query%20Optimizations%20for%20the%20Logical%20Data%20Warehouse?category=Performance+%26+Optimization). To see more information about cost-based optimizations and how to enable and use it in Denodo, see section ‘Gathering the Statistics of Views’ of the [Denodo Virtual DataPort Administration Guide](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/optimizing_queries/cost-based_optimization/gathering_the_statistics_of_views). I hope this helps!
Denodo Team
05-06-2018 08:56:40 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here