Refresh a Complex Materialized View

ぐ巨炮叔叔 提交于 2020-01-06 01:53:13

问题


I have a materialized view and I used some joins for it's statement. And now I have a refresh problem with it. It takes too long time (even more than an hour).

I want to have all data but refresh last 2 day's data. Is there any solution for my problem?

thanks.


回答1:


To improve the performance of your query try google for "improving query performance". There are a few tips you might want to know. (or I could suggest you some if you want)

IF and only if the performance of your query cannot be improved, this is my suggestion: Create 2 materialized views: One of them keeping all data except last 2 days and create a job to refresh it over the night. The other one keeping only the data for the last 2 days. You may refresh it when you want and probably might work much faster. Then create an union view between these 2 views.



来源:https://stackoverflow.com/questions/24609631/refresh-a-complex-materialized-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!