用于创建物化视图的表空间?
我正在尝试创建这样的视图:
CREATE MATERIALIZED ReasonableSizedView
TABLESPACE MyMediumTS
AS
select COUNT(something) AS allsomethings,
thetype AS thing,
status
from SomeMassiveTable
where
thetype = 'x'
AND status IN (0,1,2,3)
GROUP BY
thetype,
status;
我得到的只是一个错误:ORA-01658
:无法在表空间MySmallTS中创建段的初始范围
好的,现在,MySmallTS
是我尝试创建视图的用户的默认 ts - 并且它已满。完整表空间的问题是一个单独的问题,并且正在处理中,但到底为什么 Oracle 试图将它用于此视图,即使我明确告诉了我想要它的位置?
此外,如果我更改查询 a 并删除group by
,它将起作用,并且它将在正确的表空间中创建视图。
我想知道,分组和求和等整个操作不应该使用为该用户分配的 TEMP 表空间吗?这看起来很合理,顺便说一句,我的临时工有足够的空间......
为什么会这样?
谢谢
I'm trying to create a view as such:
CREATE MATERIALIZED ReasonableSizedView
TABLESPACE MyMediumTS
AS
select COUNT(something) AS allsomethings,
thetype AS thing,
status
from SomeMassiveTable
where
thetype = 'x'
AND status IN (0,1,2,3)
GROUP BY
thetype,
status;
And all I get is an error: ORA-01658
: unable to create INITIAL extent for segment in tablespace MySmallTS
Okay, now, MySmallTS
is the default ts for the user I'm trying to create the view - and it is full. The thing of a full table space, is a problem apart, and is being dealt with, but why on earth is Oracle trying to use it for this view even though I'm explicitly telling where I want it?
Further more, if I change the query a and remove the group by
's, it will work, and it will create the view in the correct table space.
I wonder, the whole operation of grouping and summing and stuff, shouldn't that be using the TEMP
table space assigned for that user? That would seem reasonable, and by the way, my temp has plenty of space...
why is that so?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基于它在删除 GROUP BY 时起作用的事实,我的猜测是 MySmallTS 也被指定为该用户的默认临时表空间。
构建中间结果将在临时表空间中完成,当使用 GROUP BY 时,这对于 MySmallTS 来说太大了
Based on the fact that it works when removing the GROUP BY, my guess is that MySmallTS is also assigned as the default temporary tablespace for that user.
Building the intermediate result will be done in the temporary tablespace and when using the GROUP BY this gets too big for MySmallTS