Check execution plan hash value (PLAN_HASH_VALUE) for a specific SQL_ID
If you want to check the execution plan hash value (PLAN_HASH_VALUE) for a specific SQL_ID in Oracle, use one of these queries:
Current Cursor Cache (V$SQL)
Historical Plans from AWR (DBA_HIST_SQLSTAT)
Get Detailed Plan Information (DBMS_XPLAN)
For the current plan in memory:
Check All Plans Associated with a SQL_ID
Check SQL Plan Baselines (if used)
Example
For SQL_ID 5g8t1m9n2abc3:
This will return the plan hash value(s) Oracle is currently using for that SQL statement. If multiple rows are returned, the SQL has been executed with different plans (e.g., due to Adaptive Plans, bind peeking, or plan evolution).
No comments:
Post a Comment