最初由 SHSUMMER 发布
[B]同样的sql,同样的表,由于执行计划的不同,会得到不同的结果集? [/B]
[PHP]
SQL> select /*+ full(t) */ object_name from t where rownumselect /*+ index(t) */ object_name from t where rownumselect /*+ full(t) */ object_name from t where rownumselect /*+ index(t) */ object_name from t where rownumselect object_name from t where rownumalter session set optimizer_mode = rule;
会话已更改。
SQL> select object_name from t where rownumselect /*+ full(t) */ object_name from t where rownumselect /*+ index(t) */ object_name from t where rownumselect /*+ full(t) */ object_name from dba_objects where rownum select /*+ index(t) */ object_name fromdba_objects where rownum select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE10.2.0.1.0Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
我怎么得不到yang斑竹的结果
最初由 棉花糖ONE 发布
[B]SQL> select /*+ full(t) */ object_name from dba_objects where rownum select /*+ index(t) */ object_name fromdba_objects where rownum select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE10.2.0.1.0Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
我怎么得不到yang斑竹的结果 [/B]
Youwould like to create table t and index on it.