oracle物化视图刷新时间
有人能告诉我使用以下设置将物化视图设置为刷新的频率吗?
按需刷新力从 sysdate+0 NEXT (round(sysdate) + 1/24) + 1 开始,
我想我每小时都会读一次,但我不确定
anyone able to tell me how often a materialized view is set to refresh with the following setting plz?
REFRESH FORCE ON DEMAND START WITH sysdate+0 NEXT (round(sysdate) + 1/24) + 1
i think i read it as every hour but i'm not sure
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
回答你的第一个问题(这会每小时运行一次吗?):
不,这会在你创建它时运行一次,因为这个子句:
就我个人而言,我认为“+0”是无关紧要的,就像现在一样。
那么它将在明天凌晨 1 点运行,因为有以下子句:
“1/24”部分计算凌晨 1 点的时间,因为 Oracle 日期实际上存储为数字,小数部分表示小时、分钟等。语法就很好了。
To answer your first question (will this run once an hour?):
Nope, this will run once when you create it because of this clause:
Personally, I think the "+0" is extraneous, as now is now.
Then it will run tomorrow at 1 a.m., because of the following clause:
The "1/24" part calculates when 1 a.m. is, since Oracle dates are actually stored as numbers, with the decimal part indicating hours, minutes, etc. The syntax is just fine.
我不能 100% 确定它在物化视图调度语句中是合法的,但您可能想尝试(可以说)更直观的 INTERVAL 规范:
此处的其他示例: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements003。 htm#SQLRF00221
I'm not 100% sure that it's legal in a materialized view scheduling statement, but you might like to try the (arguably) more intuitive INTERVAL specification:
Other examples here: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements003.htm#SQLRF00221
我认为使用
更准确
i think using
is more accurate