alter system set
"_optimizer_connect_by_cost_based"
=
false
scope=both ;
或者在session级别执行下列sql:
alter session set
"_optimizer_connect_by_cost_based"
=
false
scope=both ;
或者直接在语句级别加hint:
当然,从本case的实际情况看,在数据库级别执行隐含参数的设置是最为合适的,避免在程序中做过多的改动。