2026-03-12 20:23:15
This commit is contained in:
33
idev/perf_explain_plan.sql
Normal file
33
idev/perf_explain_plan.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
-- +----------------------------------------------------------------------------+
|
||||
-- | Jeffrey M. Hunter |
|
||||
-- | jhunter@idevelopment.info |
|
||||
-- | www.idevelopment.info |
|
||||
-- |----------------------------------------------------------------------------|
|
||||
-- | Copyright (c) 1998-2011 Jeffrey M. Hunter. All rights reserved. |
|
||||
-- |----------------------------------------------------------------------------|
|
||||
-- | DATABASE : Oracle |
|
||||
-- | FILE : perf_explain_plan.sql |
|
||||
-- | CLASS : Tuning |
|
||||
-- | PURPOSE : Report the access path of a given STATEMENT_ID contained within |
|
||||
-- | a PLAN_TABLE. |
|
||||
-- | NOTE : As with any code, ensure to test this script in a development |
|
||||
-- | environment before attempting to run it in production. |
|
||||
-- +----------------------------------------------------------------------------+
|
||||
|
||||
SELECT
|
||||
LPAD(' ',2*level)
|
||||
||operation
|
||||
||' '
|
||||
||options
|
||||
||' '
|
||||
||object_name Q_PLAN
|
||||
FROM
|
||||
plan_table
|
||||
WHERE
|
||||
statement_id = '&&STATEMENT_ID'
|
||||
CONNECT BY
|
||||
prior id = parent_id
|
||||
AND statement_id = '&&STATEMENT_ID'
|
||||
START WITH
|
||||
id = 1
|
||||
/
|
||||
Reference in New Issue
Block a user