Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • handling filenname with space Linux/Unix
  • Jai Shree Ram Oracle
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • CPU Core related projections AWS
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • SQL Server: How to see historical transactions SQL Server
  • Very clear article about oracle dataguard Oracle
  • create trigger syntax Oracle
  • Wait time tuning research Oracle
  • Updated LCK.SQL file. Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • pvm_pre_change.sql Oracle
  • Jai Shree Ram Oracle
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • Validating ORACLE_SID againt oratab file. Linux/Unix

Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql

Posted on 27-Sep-2006 By Admin No Comments on Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql

REM fplan.sql

REM Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE.

column plan_hash_value format 999999999999

accept v_sqlid prompt ‘Enter SQL_ID : ‘

accept v_plan_hash_value prompt ‘Enter PLAN Hash Value : ‘

SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position)

“Query Plan”

FROM dba_hist_sql_plan

START WITH id = 0 and sql_id=’&v_sqlid’ and plan_hash_value=&v_plan_hash_value

CONNECT BY PRIOR id = parent_id and sql_id=’&v_sqlid’ and plan_hash_value=&v_plan_hash_value;

Oracle, SQL scripts

Post navigation

Previous Post: Find Plan Hash value fphv.sql
Next Post: currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql

Related Posts

  • To find explain plan for a statement that occurred in past. Oracle
  • All About oracle password and security from metalink Oracle
  • ext#.sql Oracle
  • Formatter Explain plan Output 1 Oracle
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • Sequence Resetting Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Find total file sizes Linux/Unix
  • How to analyze statspack or AWR report. Oracle
  • Reading config file from other folder inside class Python/PySpark
  • find_arc.sql Oracle
  • fkwoind.sql fkwoindex.sql Oracle
  • create database syntax Oracle
  • Directory wise folder wise space usage Linux/Unix
  • find_err.sql for finding errors from dba_errors. Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme