分析物件DBMS_UTILITY.ANALYZE_SCHEMA(8i以前版本)
DBMS_UTILITY.ANALYZE_SCHEMA
This routine will generate statistics on an individual schema level. It is used for analyzing all tables, clusters and indexes.
It takes the following parameters:
- schema - Name of the schema
- method - Estimation method, COMPUTE or ESTIMATE. DELETE can be used to remove statistics.
- estimate_rows - The number of rows to be considered for estimation.
- estimate_percent - The percentage of rows to be considered for estimation.
- method_opt - Method options. Generate statistics FOR TABLE, FOR ALL COLUMNS, FOR ALL INDEXED COLUMNS, FOR ALL INDEXES.
If the ESTIMATE method is used, then either estimate_rows or estimate_percent should be specified; these actually specify the sample size to be considered.
Call syntax
dbms_utility.analyze_schema(schema, method, estimate_rows, estimate_percent, method_opt)
e.g.: Computing statistics for a schema
SQL> exec dbms_utility.analyze_schema('SYSTEM', 'COMPUTE');
PL/SQL procedure successfully completed.
e.g.: Estimating statistics for a schema, sample size is 1024 row.
SQL> exec dbms_utility.analyze_schema('FEM', 'ESTIMATE', estimate_rows => 1024);
PL/SQL procedure successfully completed.
e.g.: Estimating statistics for FA schema, sample size is 10 percent of rows.
SQL> exec dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => 10);
PL/SQL procedure successfully completed.
e.g.: Deleting statistics for FA schema
SQL> exec dbms_utility.analyze_schema('FA', 'DELETE');
PL/SQL procedure successfully completed.
e.g.: Estimating statistics with 5 percent rows for all indexes in a schema.
SQL> exec dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => 5,
method_opt => 'FOR ALL INDEXES');
PL/SQL procedure successfully completed.
e.g.: Estimating statistics with 5 percent rows for columns with indexes in a schema.
SQL> exec dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => 5,
method_opt => 'FOR ALL INDEXED COLUMNS');
PL/SQL procedure successfully completed.
e.g.: Estimating statistics with 5 percent rows for all columns in a schema.
SQL> exec dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => 5,
method_opt => 'FOR ALL COLUMNS');
PL/SQL procedure successfully completed.
e.g.: Estimating statistics for all tables in a schema.
SQL> exec dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => 5,
method_opt => 'FOR TABLE');
PL/SQL procedure successfully completed.
e.g.: Proper sample size should be given, otherwise ORA-01493 is encountered.
SQL> exec dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => -5);
BEGIN dbms_utility.analyze_schema('FA', 'ESTIMATE', estimate_percent => -5); END;
*
ERROR at line 1:
ORA-01493: invalid SAMPLE size specified
ORA-06512: at "SYS.DBMS_DDL", line 179
ORA-06512: at "SYS.DBMS_UTILITY", line 331
ORA-06512: at line 1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7478833/viewspace-402624/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DBMS_UTILITY.ANALYZE_SCHEMA
- 誰有jive2。0以前的版本?
- Oracle 8i 新分析工具-LogMiner(轉)Oracle
- 用 Golang 重構了下自己站 (以前 Laravel 版本)GolangLaravel
- 玩轉logminer-9i以前版本做法(一)
- 理解和使用Oracle 8i分析工具-LogMiner(轉)Oracle
- MAXLOGFILES應該以前的版本就能自動擴充套件套件
- win10如何回退到較早版本 win10系統怎麼回退以前的版本Win10
- 版本中刪除物件導致當前和子版本中物件不可見物件
- oracle 8i的restoreOracleREST
- Oracle 10g NLS 環境變數設定/和以前版本有變化Oracle 10g變數
- win10專業版系統怎麼隱藏資料夾“以前的版本”Win10
- 請慎重分析物件!物件
- 以前的shell筆記筆記
- 如何將 12c 資料庫降級為以前的版本 (文件 ID 1602889.1)資料庫
- 10g及以前版本execute immediate不支援clob型別,11g已經支援型別
- Oracle 8i DataGuard 的啟用Oracle
- Oracle 8i 密碼驗證Oracle密碼
- golang物件導向分析Golang物件
- javaScript BOM物件分析整理JavaScript物件
- Android 升級到Android Studio2.2 後打不開以前版本的專案Android
- oracle 8i 提高imp速度的方法Oracle
- Plan Stability in Oracle 8i/9iOracle
- ORACLE 8I 建立密碼檔案!Oracle密碼
- Oracle 8i 是Java 寫的? (轉)OracleJava
- RedHat AS3安裝Oracle 8iRedhatS3Oracle
- Power Point 2003 的問題:有時打不開以前版本的PPT檔案(轉)
- Java 物件記憶體分析Java物件記憶體
- swift 物件儲存地址分析Swift物件
- 物件導向建模分析(一)物件
- 以前端視角,漫談「雲端」前端
- 王子以前是程式設計師程式設計師
- find 刪除以前的檔案
- 對以前專案的重構
- 使用易語言COM物件取檔案版本物件
- 相容IE低版本的XMLHttpRequest物件的建立XMLHTTP物件
- win7正版版本分析Win7
- Joomla 物件注入漏洞分析報告OOM物件