-
-
Notifications
You must be signed in to change notification settings - Fork 835
Open
Labels
Description
I think having bi_sql_view generate materialized views by default is not the best setting, and I would like to have the default value for this field to be False
The reasons behind this:
- refreshing a materialized view has a cost, especially on the database server (there are some locks which are taken during the refresh, with ACCESS EXCLUSIVE level, and these block SELECT queries, which is not nice at all)
- I see views created by non technical users with the refresh cron set to run every 5 min 😑
By having the default set to "non materialized view" we get a "real" action to setup the refresh machinery,
What we could have as an improvement in the sql view workflow is a check of the time needed to get the data of the view. If that time is greater than a threshold (2s for instance), then maybe a suggestion to switch to a materialized view, explaining the tradeoffs could be displayed.
Any opinion on this?
sebalix