Oracle Group By 默认排序文件

问题描述:

oracle 9i 下的Group By 后面不加order by ,以前都有默认排序的,现在换成11g后就没有排序了

分析:

9i没有hash group by,10g才有_gby_hash_aggregation_enabled 是隐含参数

普通show parameter查不到的

方法:

1、在SYS用户下执行SQL:

 select ksppinm NAME, ksppstvl VALUE

      from x$ksppi pi, x$ksppcv cv

     where cv.indx = pi.indx

       and pi.ksppinm like '%_gby_hash_aggregation_enabled%';

NAME

--------------------------------------------------

VALUE

--------------------------------------------------

_gby_hash_aggregation_enabled

TRUE

2、修改参数:

ALTER SYSTEM SET "_gby_hash_aggregation_enabled" = FALSE;

猜你喜欢

转载自vvnet.iteye.com/blog/1976973