Script: Script to Simplify the Use of Explain Plan (Doc ID 1019631.6)
Script: Script to Simplify the Use of Explain Plan (Doc ID 1019631.6)
Abstract | |
---|---|
Script to obtain the execution plan of a SQL statement. | |
Product Name, Product Version |
Oracle Server, 7.x to 9.x |
Platform | Platform Independent |
Date Created | 19-Jun-2000 |
Instructions | |
Execution Environment: |
|
Description | |
The following script is intended to assist application developers and performance specialists in determining the execution path of a given SQL statement without having to trace and tkprof the statement. To use, you will make a copy of this file, then place the sql statement to be analyzed in the copy and run the script. Sample Output ============= OPERATIONS OPTIONS OBJECT_NAME ------------------------- --------------- ----------------------- MERGE JOIN SORT JOIN TABLE ACCESS FULL DEP SORT JOIN TABLE ACCESS FULL EMP |
|
References | |
[Include references to FAQ, Troubleshooting guide, and Current issues Articles from Top Tech Docs or other relevant references.] |
|
Script | |
SET ECHO off REM NAME: TFSXPLAN.SQL REM USAGE: See PURPOSE REM ------------------------------------------------------------------------ REM REQUIREMENTS: REM utlxplan.sql must be run prior to this script! REM ------------------------------------------------------------------------ REM AUTHOR: REM Craig A. Shallahamer, Oracle USA REM ------------------------------------------------------------------------ REM PURPOSE: REM The following script is intended to assist application developers and REM performance specialists in determining the execution path of a given REM SQL statement without having to trace and tkprof the statement. REM REM To use, you will make a copy of this file, then place the SQL REM statement to be analyzed in the copy and run the script. REM REM EXAMPLE REM REM 1. $ cp $path/explbig.sql x.sql REM 2. modify x.sql with your SQL. REM 3. SQL>@x.sql REM REM ------------------------------------------------------------------------ REM EXAMPLE: REM OPERATIONS OPTIONS OBJECT_NAME REM REM ------------------------- --------------- ----------------------- REM MERGE JOIN REM SORT JOIN REM TABLE ACCESS FULL DEPT REM SORT JOIN REM TABLE ACCESS FULL EMP REM REM ------------------------------------------------------------------------ REM DISCLAIMER: REM This script is provided for educational purposes only. It is NOT REM supported by Oracle World Wide Technical Support. REM The script has been tested and appears to work as intended. REM You should always run new scripts on a test instance initially. REM ------------------------------------------------------------------------ REM Main text of script follows: col operation format a13 trunc col options format a15 trunc col object_name format a23 trunc col id format 9999 col parent_id format 9999 col position format 9999 col operations format a25 explain plan set statement_id = 'x' into plan_table for <> select lpad(' ',2*level) || operation operations,options,object_name from plan_table where statement_id = 'x' connect by prior id = parent_id and statement_id = 'x' start with id = 1 and statement_id = 'x' order by id; rollback; |
|
Disclaimer | |
EXCEPT WHERE EXPRESSLY PROVIDED OTHERWISE, THE INFORMATION, SOFTWARE, PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS. ORACLE EXPRESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ORACLE MAKES NO WARRANTY THAT: (A) THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SOFTWARE WILL BE ACCURATE OR RELIABLE; OR (B) THE INFORMATION, OR OTHER MATERIAL OBTAINED WILL MEET YOUR EXPECTATIONS. ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE DOWNLOADED OR OTHERWISE OBTAINED IS DONE AT YOUR OWN DISCRETION AND RISK. ORACLE SHALL HAVE NO RESPONSIBILITY FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OF ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE. ORACLE RESERVES THE RIGHT TO MAKE CHANGES OR UPDATES TO THE SOFTWARE AT ANY TIME WITHOUT NOTICE. |
|
Limitation of Liability | |
IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, ARISING FROM YOUR ACCESS TO, OR USE OF, THE SOFTWARE. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. |
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1135898/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- USE EXPLAIN PLANAI
- SCRIPT: Script to Generate object privilege GRANTS (Doc ID 1020176.6)Object
- how to use coffee script
- Use the statspack to generate the accurate explain planAI
- Use windows batch script to create menuWindowsBAT
- RMAN Backup Shell Script Example (Doc ID 137181.1)
- Script to Show Audit Options/Audit Trail (Doc ID 1019552.6)AI
- Script: To remove Chained Rows from a Table (Doc ID 1019556.6)REMAI
- Script to Collect DRM Information (drmdiag.sql) (Doc ID 1492990.1)ORMSQL
- Script: To list Foreign Key Constraints (Doc ID 1039297.6)AI
- DEPRECATED: Use of this script to execute hdfs command is deprecated.
- Script to Show System and Object Privs for a User (Doc ID 1019508.6)Object
- Script to Report Extents and Contiguous Free Space (Doc ID 162994.1)
- IDC Script實戰
- IDM-Activation-Script
- Explain PlanAI
- Script
- 請說說`<script>`、`<script async>`和`<script defer>`的區別
- explain plan VS execution planAI
- Script Browser & Script Analyzer 1.3更新發布
- Shell Script
- shell script
- oracle scriptOracle
- script win
- bat scriptBAT
- DBMS_REPAIR SCRIPT [ID 556733.1]AI
- Oracle EXPLAIN PLAN用法OracleAI
- Explain for the Statistics of Execution PlanAI
- explain plan 的用法AI
- script標籤
- [Oracle Script] LockOracle
- Tablespace Space Script
- Cold backup script
- Oracle Database ScriptOracleDatabase
- tom's script
- Shell Script(轉)
- "scnhealthcheck.sql" script (文件 ID 1393363.1)SQL
- oracle explain plan for的用法OracleAI