编译和刷新物化视图有什么区别?
我们刚刚遇到了一个问题,即物化视图不刷新,并给出编译错误。一位高级开发人员表示,他刚刚找到解决方法——告诉蟾蜍编译物化视图。
所以我的问题很简单:刷新和“编译”有什么区别?
We just ran into a problem where materialized views weren't refreshing, and giving a compile error. One of the senior developers says he just figured out how to fix it -- by telling toad to compile the materialized view.
So my question is pretty simple: what's the difference between a refresh and a "compile"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
物化视图的刷新是一种数据操作。 MV 中的数据按照创建视图时指定的方式进行更新,例如快速刷新、完全刷新等。
编译 MV 时,Oracle 会重新验证视图所基于的查询。由于 MV 所基于的一个或多个底层对象发生更改,您的 MV 可能会无效。
A Refresh of a materialized view is a data operation. The data in the MV is brought up to date as specified when the view was created, e.g., fast refresh, complete refresh, etc.
When you compile the MV, Oracle revalidates the query upon which the view is based. Your MV may be invalid due to changes in one or more of the underlying objects upon which the MV is based.
刷新会更新物化视图所保存的数据。如果物化视图的定义无效,则无法完成此操作。
编译验证物化视图的定义,即SQL是否有效以及它所依赖的对象是否存在。
A refresh updates the data that the materialized view holds. This cannot be done if the materialized view's definition is invalid.
A compile validates the definition of the materialized view, i.e. that the SQL is valid and that the objects it relies on exist.
编译=验证并运行
刷新=重新提交数据。
它具有与编程之外相同的含义和定义。
Compile = validation and run
Refresh = resubmitting the data.
It holds the same meaning and definition as it does outside of programming.