Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Checking SQL Server Version SQL Server
  • This is from Temi Oracle
  • Exadata Basics Oracle
  • Implementing Listener Security Oracle
  • v$backup.status information Oracle
  • Find_planinfo.sql Oracle
  • perf_today.sql Oracle
  • Add new columns in dataframe Python/PySpark
  • Rename Tablespace Oracle
  • eplan9i.sql Oracle
  • Creating a Container Database using dbaascli Uncategorized
  • To see mem usage and CPU usage system wide. Linux/Unix
  • normal maintenance for exp-imp and renaming table Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • Finding Oracle Patches with opatch Oracle

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

  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • Convert multiple rows to single column Oracle
  • dbms_job.submit example Oracle
  • Jai Shree Ram Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • find_open_cur.sql Find open cursorts per session 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
  • Specify the Rollback segment to use in Transaction Oracle
  • create a folder in multiple places Linux/Unix
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • export import with parameter file. Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • cif crons Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme