Oracle 11g破碎的实体化视图:是否在不删除视图或刷新视图的情况下停止刷新? [英] Oracle 11g Broken Materialized view: Stop refresh without dropping view or refreshing view?

查看:185
本文介绍了Oracle 11g破碎的实体化视图:是否在不删除视图或刷新视图的情况下停止刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个综合视图(我知道...):

So I've got a materalized view (I know...) :

CREATE MATERIALIZED VIEW vw_my_view_here
REFRESH COMPLETE START WITH SYSDATE NEXT SYSDATE + 1/24 AS 
/*huge-ass select statement here*/
UNION ALL
/*huge-ass select statement here*/
UNION ALL
/*huge-ass select statement here*/
UNION ALL
/*huge-ass select statement here*/

它已经存在于我们的系统中一段时间​​,而不会引起问题.这些选择查询之一已损坏(以某种方式-可能在基础表中发生模式更改),并且已经连续运行24小时并消耗了所有资源.这对盒子上的其他东西来说是个问题.

This has been present in our system for some time without causing issues. One of these select queries is broken (somehow - presumibly schema changes in the underlying tables) and has taken to running for 24 hours straight and consuming all of the boxes resources. This is a problem for the other things on the box.

我无法删除或修改视图-因为它是完全未记录的(我知道...),因此我需要先弄清楚谁使用它,如何填充它,等等.

I can't drop or modify the view - as it's completely undocumented (I know...) and I need to figure out who consumes it, how it's populated, etc. first.

我试图杀死正在处理查询的进程,但是随后似乎立即触发了另一个查询.

I tried killing the process that's handling the query, but it seems another query is fired straight away afterwards.

如何在不1)删除视图和(2)不刷新视图的情况下停止实例化视图(因为这将花费24个小时以上的时间,并且占用了我们所有的包装盒资源).

How can I stop the materialized view without 1) dropping the view and (2) without refreshing the view (because that's taking 24+ hours and all of our box resources).

我尝试跑步

 alter materialized view view_name refresh on demand;

,但是它似乎无限运行,对原始的大规模查询没有影响.

but it seems to just run endlessly with no effect on the original massive query.

有什么想法吗?

推荐答案

此子句仅设置默认的刷新选项.有关实际实施刷新的说明,请参阅《 Oracle数据库高级复制》和《 Oracle数据库数据仓库指南》.

This clause only sets the default refresh options. For instructions on actually implementing the refresh, refer to Oracle Database Advanced Replication and Oracle Database Data Warehousing Guide.

因此,您的alter materialized view语句本身并未进行刷新.它只是在等待当前正在执行的刷新完成,然后才能更新该视图的数据字典.当前刷新完成(或终止)后,alter将完成并阻止进一步的自动刷新开始.

So your alter materialized view statement is not doing a refresh itself. It is just waiting for the currently-excuting refresh to complete before it can update the data dictionary for that view. Once the current refresh completes (or is terminated) the alter will complete and prevent further automatic refreshes from being started.

这篇关于Oracle 11g破碎的实体化视图:是否在不删除视图或刷新视图的情况下停止刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆