- 最后登录
- 2018-11-1
- 在线时间
- 377 小时
- 威望
- 29
- 金钱
- 6866
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 891
- 精华
- 4
- 积分
- 29
- UID
- 1
|
2#
发表于 2014-4-9 20:54:06
SQL> select count(*) from macdt;
COUNT(*)
----------
617992
select * from v$VerSION;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
alter session set events '10046 trace name context forever,level 12';
alter system flush buffer_cache;
select /*+ DYNAMIC_SAMPLING(t 1) */ count(*) from macdt t;
alter system flush buffer_cache;
select /*+ DYNAMIC_SAMPLING(t 2) */ count(*) from macdt t;
alter system flush buffer_cache;
select /*+ DYNAMIC_SAMPLING(t 3) */ count(*) from macdt t;
alter system flush buffer_cache;
select /*+ DYNAMIC_SAMPLING(t 4) */ count(*) from macdt t;
alter system flush buffer_cache;
select /*+ DYNAMIC_SAMPLING(t 10) */ count(*) from macdt t;
DYNAMIC_SAMPLING(t 1) 时的动态采用语句
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0)
, NVL(SUM(C2),0) FROM (SELECT /*+ NO_PARALLEL("T") FULL("T") NO_PARALLEL_INDEX("T") */ 1 AS C1, 1 AS C2 FROM "SYS"."MACDT" SAMPLE BLOCK (0.340547 , 1) SEED (1) "T") SAMPLESUB
DYNAMIC_SAMPLING(t 2) 时的动态采用语句
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0)
, NVL(SUM(C2),0) FROM (SELECT /*+ NO_PARALLEL("T") FULL("T") NO_PARALLEL_INDEX("T") */ 1 AS C1, 1 AS C2 FROM "SYS"."MACDT" SAMPLE BLOCK (0.692080 , 1) SEED (1) "T") SAMPLESUB
DYNAMIC_SAMPLING(t 3) 时的动态采用语句
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0)
, NVL(SUM(C2),0) FROM (SELECT /*+ NO_PARALLEL("T") FULL("T") NO_PARALLEL_INDEX("T") */ 1 AS C1, 1 AS C2 FROM "SYS"."MACDT" SAMPLE BLOCK (1.395144 , 1) SEED (1) "T") SAMPLESUB
DYNAMIC_SAMPLING(t 4) 时的动态采用语句
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0)
, NVL(SUM(C2),0) FROM (SELECT /*+ NO_PARALLEL("T") FULL("T") NO_PARALLEL_INDEX("T") */ 1 AS C1, 1 AS C2 FROM "SYS"."MACDT" SAMPLE BLOCK (2.801274 , 1) SEED (1) "T") SAMPLESUB
DYNAMIC_SAMPLING(t 10) 时的动态采用语句
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0)
, NVL(SUM(C2),0) FROM (SELECT /*+ NO_PARALLEL("T") FULL("T") NO_PARALLEL_INDEX("T") */ 1 AS C1, 1 AS C2 FROM "SYS"."MACDT" "T") SAMPLESUB
|
|