Oracle 22 select 语句中不允许加入或超过连接? ORA-01445
ORA-01445: 无法从没有连接视图的连接视图中选择 ROWID 或对其进行采样 密钥保存表
我在 ORACLE 10g 上有一个很长的 select 语句。 根据这个错误陈述,我在google上看到了一些答案。答案之一是:
* 连接中表数量的限制 我遇到了一个不寻常的错误 (4204878/ 3765373/ 3004824) 在 Oracle 9.2.0.5 上。当超过 22 ANSII 连接是在 select 语句中完成的,出现 ORA-01445。根据 支持“1-一所以
我计算整个 select 块内的联接数量;为 23(在 select 和 where 子句之后)。 具有此“select”t 语句的 SP 工作得很好,直到我在 where 子句后添加了这个新的连接...
简而言之,我通过禁用现有连接之一并启用我新添加的连接进行了测试,并且 SP 工作了。
您认为真的有什么限制吗?
** 我不能给你网站地址,因为它总是被 StackOverflow 用户发现。
ORA-01445: cannot select ROWID from, or sample, a join view without a
key-preserved table
I have a long select statement on ORACLE 10g.
According to this error statement, I have seen some answers on google. One of the answer is saying that ;
* limit on number of tables in join I 've run across an unusual bug
(4204878/ 3765373/ 3004824) on Oracle 9.2.0.5. When more than 22 ANSII
joins are done in a select statement an ORA-01445 occurs. According to
Support "1- One so
I count the number of joins inside the whole select block; is 23 (after select and after where clause).
The SP which has this "selec"t statement was working perfectly until I added this new join after where clause...
For short, I ve tested by disabling one of existing join and enabled my newly added join and SP worked.
What do you think are there really any limit ?
** I can't give you the web site addess since it is always found smearing by the users of StackOverflow..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经遇到过这些错误好几次了。这种情况在带有 ANSI 连接的 9i 中经常发生,我发现它在 10g 中发生的频率较低。
一种解决方法是重写连接以使用“旧”连接合成,特别是外部连接,如 APC 指出的:
I've run into these bugs a couple of times. It happened a lot in 9i with ANSI joins and i've found it happens less frequently in 10g.
One workaround is to rewrite the join to use the "old" join synthax, specifically outer joins as APC pointed out:
我通过选择查询中使用的列解决了这个问题。
从这:
到这:
I've solved that issue by just selecting the columns that I used on query.
From this:
To this: