10G FAST DUAL 的優化
FAST DUAL 引入
在10G之前,每次都要呼叫dual都會產生邏輯IO,如果一個系統大量的呼叫DUAL,會產生的邏輯IO會非常驚人。
到了10G,對於DUAL有優化。
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
NLSRTL Version 10.2.0.4.0 - Production
SQL> set autotrace traceonly
--注意優化僅僅是針對特定的DUAL語句,如果是檢視dual的資料,那是沒有變化的。
SQL> select * from dual;
Execution Plan
----------------------------------------------------------
Plan hash value: 3543395131
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------
Statistics
----------------------------------------------------------
24 recursive calls
0 db block gets
7 consistent gets
3 physical reads
0 redo size
511 bytes sent via SQL*Net to client
487 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL> select sysdate from dual;
Execution Plan
----------------------------------------------------------
Plan hash value: 1546270724
-----------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
-----------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 2 (0)| 00:00:01 |
| 1 | FAST DUAL | | 1 | 2 (0)| 00:00:01 |
-----------------------------------------------------------------
Statistics
----------------------------------------------------------
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
519 bytes sent via SQL*Net to client
487 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
這是9I的TRACE 結果:
SQL> select * from v$version where rownum < 2;
BANNER
----------------------------------------------------------------
Oracle9i Release 9.2.0.4.0 - Production
SQL> set autotrace traceonly
SQL> select sysdate from dual;
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT ptimizer=CHOOSE
1 0 TABLE ACCESS (FULL) OF 'DUAL'
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
3 consistent gets
0 physical reads
0 redo size
383 bytes sent via SQL*Net to client
499 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/40239/viewspace-620891/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- FAST DUAL執行計劃?AST
- Oracle10g的FAST DUAL執行計劃OracleAST
- 針對enq: KO - fast object checkpoint的優化ENQASTObject優化
- 如何優化10g exp/imp優化
- 利用Oracle 10g SQL優化器(STA)優化語句Oracle 10gSQL優化
- 10G FAST_START_MTTR_TARGET引數AST
- 10g優化備份集大小優化
- oracle的dual表Oracle
- 【DUAL】資料庫nomount狀態下DUAL的內容資料庫
- 10g Logical Standby的建立,優化及管理 - 更新優化
- 【效能優化】CBO,RBO在ORACLE 10g 中的應用優化Oracle 10g
- Oracle9i, 10g 優化模式 OPTIMIZER_MODEOracle優化模式
- [書籍] Oracle Database 10g效能調整與優化OracleDatabase優化
- 10g效能優化嚮導的第14章需要反覆閱讀優化
- 探索oracle dual表Oracle
- 10g升級至11g需要考慮的引數優化優化
- Oracle中dual表的用途介紹Oracle
- Oracle dual表 詳解Oracle
- ORACLE DUAL表詳解Oracle
- 10g RAC UDP私有網路的調優UDP
- MySQL優化(1)——–常用的優化步驟MySql優化
- fast-inAST
- 【效能優化】Oracle 10g 資料庫之間複製統計資訊優化Oracle 10g資料庫
- 【原創】Oracle10g dual表的研究Oracle
- 誤刪除dual表的解決辦法
- dual表與create table語句的關係
- 前端效能優化(JS/CSS優化,SEO優化)前端優化JSCSS
- hive的優化Hive優化
- web的優化Web優化
- mysql的優化MySql優化
- Cacti的優化優化
- 9i,10g 優化器動態取樣級別引數 -- optimizer_dynamic_sampling (統計優化)優化
- mybatis中insert into ...select ...from dual union all select ... from dual 提示sql命令未結束的問題MyBatisSQL
- Oracle 10g SGA 的自動化管理Oracle 10g
- fast重新整理的限制AST
- fast_start_parallel_rollback與v$fast_start_servers和v$fast_start_transactionsASTParallelServer
- 效能優化案例-SQL優化優化SQL
- MSSQL優化之索引優化SQL優化索引