0% found this document useful (0 votes)
5 views

Performance Tuning Steps

The document outlines performance tuning steps involving the creation of a SQL profile using the sqlT tool in EBSPRS. It includes executing a SQL script to generate a profile and provides a SQL command to verify the profile's hash value. Lastly, it mentions the need to document steps for moving the SQL profile to production (PROD).

Uploaded by

santosh1250v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Performance Tuning Steps

The document outlines performance tuning steps involving the creation of a SQL profile using the sqlT tool in EBSPRS. It includes executing a SQL script to generate a profile and provides a SQL command to verify the profile's hash value. Lastly, it mentions the need to document steps for moving the SQL profile to production (PROD).

Uploaded by

santosh1250v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Performance Tuning steps

1) Please create sqlprofile using sqlT tool in EBSPRS

cd /u01/app/orasi/Patches/1826777/sqlt/utl
sqlplus ‘/as sysdba’
SQL> START coe_xfr_sql_profile.sql 69h1kxcdctp94 3271942524;

2) Run below command and as input provide above sqlid value and check above sqlhash came in
output or not:

WITH
p AS (
SELECT plan_hash_value
FROM gv$sql_plan
WHERE sql_id = TRIM('&&sql_id.')
AND other_xml IS NOT NULL
UNION
SELECT plan_hash_value
FROM dba_hist_sql_plan
WHERE sql_id = TRIM('&&sql_id.')
AND other_xml IS NOT NULL ),
m AS (
SELECT plan_hash_value,
SUM(elapsed_time)/SUM(executions) avg_et_secs
FROM gv$sql
WHERE sql_id = TRIM('&&sql_id.')
AND executions > 0
GROUP BY
plan_hash_value ),
a AS (
SELECT plan_hash_value,
SUM(elapsed_time_total)/SUM(executions_total) avg_et_secs
FROM dba_hist_sqlstat
WHERE sql_id = TRIM('&&sql_id.')
AND executions_total > 0
GROUP BY
plan_hash_value )
SELECT p.plan_hash_value,
ROUND(NVL(m.avg_et_secs, a.avg_et_secs)/1e6, 3) avg_et_secs
FROM p, m, a
WHERE p.plan_hash_value = m.plan_hash_value(+)
AND p.plan_hash_value = a.plan_hash_value(+)
ORDER BY
avg_et_secs NULLS LAST;

Step 1 will generate a sql script like below, execute that script using sysdba
coe_xfr_sql_profile_69h1kxcdctp94_3271942524.sql

3) Execute above generated script:

Sqlplus ‘/as sysdba’

SQL> START coe_xfr_sql_profile_69h1kxcdctp94_3271942524.sql

Now we need to move this sqlprofile to PROD

PROD steps need to be documented

You might also like