奇怪的查询行为oracle 11g

时间:2013-07-29 10:51:23

标签: performance oracle11g connect-by sqltools

我的查询为:

SELECT ps_node_id,name 
FROM cz_ps_nodes WHERE cz_ps_nodes.ps_node_type=261
START WITH NAME = 'Bundle Rule Repository',cz_ps_nodes.devl_project_id = P_devl_project_id AND cz_ps_nodes.deleted_flag = 0
CONNECT BY PRIOR ps_node_id = parent_id.

此查询有效。 但是,如果我只是从选择部分删除名称,如:

SELECT ps_node_id
FROM cz_ps_nodes WHERE cz_ps_nodes.ps_node_type = 261                       
START WITH NAME = 'Bundle Rule Repository',cz_ps_nodes.devl_project_id = P_devl_project_id AND cz_ps_nodes.deleted_flag = 0                                         
CONNECT BY PRIOR ps_node_id = parent_id.

查询只是挂起但正在使用oracle 10 g,当我们升级到oracle 11g时问题就出现了。 谁能解释为什么?

1 个答案:

答案 0 :(得分:0)

使用以下方法解决问题:alter session set optimizer_features_enable = '10 .2.0.4' -