You can translate the question and the replies:

Determine if a view is a flatten view

Dear Denodo Support, i want to gather the statistics of flatten views automatically. Is there any possibility to get the type of the view ? I have read in this article, that it is recommended to gather the statistics of flatten views. https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/optimizing_queries/cost-based_optimization/tuning_the_cost-based_optimization_process#estimating-post-processing-costs Best Regards, Brenn Lukas
user
14-03-2023 09:16:26 -0400
code

1 Answer

Hi, You should use the stored procedure VIEW_DEPENDENCIES which allows you to obtain programmatically the same information that the Administration Tool displays in the [Tree View](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/tree_view/tree_view#tree-view) dialog of the derived views. To get a list of the views that use the Flatten operation, I’ve tried the VIEW_DEPENDENCIES stored procedure, executing a SELECT query and adding a filter filtered with view_database_name, view_type = ‘Flatten’ and depth>1 to avoid base views. You can get more information in [the VIEW_DEPENDENCIES section](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/stored_procedures/predefined_stored_procedures/view_dependencies) of the VDP VQL Guide. Hope this helps!
Denodo Team
16-03-2023 08:47:51 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here