When I create an awr report within two snapshots say 24139 and 24140 , I get from the part of "SQL ordered by Elapsed Time" the following information:
SQL ordered by Elapsed Time DB/Inst: DEVC/DEVC Snaps: 24139-24140
-> Resources reported for PL/SQL code includes the resources used by all SQL
statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
OUTPUT
------------------------------------------------------------------
Elapsed CPU Elap per % Total
Time (s) Time (s) Executions Exec (s) DB Time SQL Id
---------- ---------- ------------ ---------- ------- -------------
39 39 2 19.7 14.4 dccxnr2d9b3xd
So far so good.
The problem is that I want to retrieve the same information from the DBMS_SQLTUNE.SELECT_WORKLOAD_REPOSITORY for the same snapshot interval I get:
exec dbms_sqltune.create_sqlset ('MYSQLSET2');
DECLARE
cur DBMS_SQLTUNE.SQLSET_CURSOR;
BEGIN
OPEN cur FOR
SELECT VALUE(P)
FROM table(
DBMS_SQLTUNE.SELECT_WORKLOAD_REPOSITORY(24139,24140)) P;
Does anyone have an ideia why the values are different while query the same repository?
I need to retrieve the correct information and I don't know which of the sources I should rely.
Thank you in advance for any help
Bookmarks