Statspack Tables
Hi All,
How to identify whether STATSPACK is configured or not in 8x DB (thru an SQL)?
We use the following tables for the purpose mentioned next to it in 9x.
stats$snapshot -- Snapshot Details
stats$sql_summary - Statistics of SQL executed during a snap
stats$sqltext - SQL text executed
sTAtS$SYSTEM_EVENT - System events during a snap
STATS$FILESTATXS - I/O Stats during a snap
But what are equivalent tables from where we can find the similar information in 8x?
Thanks in Advance,
Jaggyam
You need probably to check if there's a PERFSTAT user/schema and what objects are owned by it.
" STATSPACK differs from the existing UTLBSTAT/UTLESTAT performance scripts in the following ways:
* They collect more data, including high resource SQL.
* Many of the manual calculations which were required with BSTAT/ESTAT are now provided; for example. the first page contains a summary of instance performance and load.
* Permanent tables are created. Each time a new "snapshot" of data is taken, it is added to these tables, with keys which allow comparison between snapshots.
* A new user, PERFSTAT, is automatically created. All objects created by this package are owned by PERFSTAT. This user has limited query-only privileges.
* Written in PL/SQL and uses SQL*Plus as the reporting tool.
Like UTLBSTAT.SQL and UTLESTAT.SQL, STATSPACK can be found in the ORACLE_HOME/rdbms/admin/ directory on UNIX and in the ORACLE_HOME/rdbms81/admin directory on NT. "
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76992/ch12_too.htm#12109
Similar Messages
-
Sql text from statspack tables
Hi,
How can I get sql information from statspack tables stats$sql_text, stats$sql_summarry..?
I tried writting sql but not able to get the proper results, please help.
select b.hash_value hash_value, a.snap_time snap_time, b.module module, b.fetches fetches, b.executions executions,
b.rows_processed rows_processed, b.cpu_time cpu_time, b.elapsed_time elapsed_time from stats$snapshot a,stats$sql_summary b
where a.snap_id=b.snap_id and b.snap_id between 1 and 13
and I need to get the complete stats$sql_text.sql_text in the same query without using any procedure or function..
version is 9.2.0.8.
Thanks
clinI'd also do this the way MOD says.
But if you are feeling adventurous, you could explore cascading delete. You can specify a primary key with "on delete cascade", which makes referred-to records automatically delete. Google for oracle delete cascade or search your Oracle docs.
I wouldn't do cascading deletes myself, though. For one, I've ran into enough trouble with many "smart" db features when trying to do db administration. -
Resetting data in statspack tables
Hello,
I want to clear all data in statspack tables since i want a fresh baseline.
I tried sppurge, but that just deletes snapshot ids. After using sppurge i could still see statistics being added from the past to my latest report.
Then tried sptrunc, but when i hit enter (on being asked value for begin or exit) the SQL plus simply disappears, and nothing gets done.
Short of dropping statspack and reinstalling it, is there anyway to establish a new baseline so going forward, reports do not reflect cumulative data from the past?
regards
Sameer
Edit: Just figured the error i get with sptrunc is
... Starting truncate operation
truncate table STATS$BUFFERED_QUEUES
ERROR at line 1:
ORA-00942: table or view does not exist
Not sure why STATS$BUFFERED_QUEUES does not existA statspack report only reports on the statistics between the two snapshots you identify in the report request. What difference would old data make except in relation to how much space the statspack tables consume?
When you attempted to issue the truncate were you the statspack owner?
HTH -- Mark D Powell -- -
Error in creating perfstat user for statspack
Hi Friends,
DB: 11.2.0.2, SE and 64 bit
OS: RHEL 5.7
My DB is on SE and hence i cannot use the diagonistic pack so when i am trying to use Statspack for the same, i am facing the following error when i am trying to create Perfstat user.
SQL> @?/rdbms/admin/spcreate
Choose the PERFSTAT user's password
Not specifying a password will result in the installation FAILING
Enter value for perfstat_password: perfstat
perfstat
Choose the Default tablespace for the PERFSTAT user
Below is the list of online tablespaces in this database which can
store user data. Specifying the SYSTEM tablespace for the user's
default tablespace will result in the installation FAILING, as
using SYSTEM for performance data is not supported.
Choose the PERFSTAT users's default tablespace. This is the tablespace
in which the STATSPACK tables and indexes will be created.
TABLESPACE_NAME CONTENTS STATSPACK DEFAULT TABLESPACE
INDUS_SML_DATA PERMANENT
INDUS_SML_INDEX PERMANENT
PERFSTAT PERMANENT
SYSAUX PERMANENT *
USERS PERMANENT
Pressing <return> will result in STATSPACK's recommended default
tablespace (identified by *) being used.
Enter value for default_tablespace: PERFSTAT
Using tablespace PERFSTAT as PERFSTAT default tablespace.
Choose the Temporary tablespace for the PERFSTAT user
Below is the list of online tablespaces in this database which can
store temporary data (e.g. for sort workareas). Specifying the SYSTEM
tablespace for the user's temporary tablespace will result in the
installation FAILING, as using SYSTEM for workareas is not supported.
Choose the PERFSTAT user's Temporary tablespace.
TABLESPACE_NAME CONTENTS DB DEFAULT TEMP TABLESPACE
TEMP TEMPORARY *
Pressing <return> will result in the database's default Temporary
tablespace (identified by *) being used.
Enter value for temporary_tablespace: TEMP
Using tablespace TEMP as PERFSTAT temporary tablespace.
... Creating PERFSTAT user
... Installing required packages
... Creating views
... Granting privileges
NOTE:
SPCUSR complete. Please check spcusr.lis for any errors.
SQL>
SQL> --
SQL> -- Build the tables and synonyms
SQL> connect perfstat/&&perfstat_password
Connected.
SQL> @@spctab
SQL> Rem
SQL> Rem $Header: rdbms/admin/spctab.sql /st_rdbms_11.2.0/1 2010/08/13 10:06:01 kchou Exp $
SQL> Rem
SQL> Rem spctab.sql
SQL> Rem
SQL> Rem Copyright (c) 1999, 2010, Oracle and/or its affiliates.
SQL> Rem All rights reserved.
SQL> Rem
SQL> Rem NAME
SQL> Rem spctab.sql
SQL> Rem
SQL> Rem DESCRIPTION
SQL> Rem SQL*PLUS command file to create tables to hold
SQL> Rem start and end "snapshot" statistical information
SQL> Rem
SQL> Rem NOTES
SQL> Rem Should be run as STATSPACK user, PERFSTAT
SQL> Rem
SQL> Rem MODIFIED (MM/DD/YY)
SQL> Rem kchou 08/11/10 - Bug#9800868 - Add Missing Idle Events for
SQL> Rem 11.2.0.2for Statspack & Standby Statspack
SQL> Rem kchou 08/11/10 - Bug#9800868 - Add missing idle events to 11.2.0.2
SQL> Rem cgervasi 05/13/09 - add idle event: cell worker idle
SQL> Rem cgervasi 04/02/09 - bug8395154: missing idle events
SQL> Rem rhlee 02/22/08 -
Rem cdgreen 03/14/07 - 11 F2SQL> Rem shsong 06/14/07 - Add idle events
SQL> Rem cdgreen 02/28/07 - 5908354
SQL> Rem cdgreen 04/26/06 - 11 F1
SQL> Rem cdgreen 06/26/06 - Increase column length
SQL> Rem cdgreen 05/10/06 - 5215982
SQL> Rem cdgreen 05/24/05 - 4246955
SQL> Rem cdgreen 04/18/05 - 4228432
SQL> Rem cdgreen 03/08/05 - 10gR2 misc
SQL> Rem vbarrier 02/18/05 - 4081984
SQL> Rem cdgreen 10/29/04 - 10gR2_sqlstats
SQL> Rem cdgreen 07/16/04 - 10gR2
SQL> Rem cdialeri 03/25/04 - 3516921
SQL> Rem vbarrier 02/12/04 - 3412853
SQL> Rem cdialeri 12/04/03 - 3290482
SQL> Rem cdialeri 11/05/03 - 3202706
SQL> Rem cdialeri 10/14/03 - 10g - streams - rvenkate
SQL> Rem cdialeri 08/05/03 - 10g F3
SQL> Rem cdialeri 02/27/03 - 10g F2: baseline, purge
SQL> Rem vbarrier 02/25/03 - 10g RAC
SQL> Rem cdialeri 11/15/02 - 10g F1
SQL> Rem cdialeri 09/27/02 - sleep4
SQL> Rem vbarrier 03/20/02 - 2143634
SQL> Rem vbarrier 03/05/02 - Segment Statistics
SQL> Rem cdialeri 02/07/02 - 2218573
SQL> Rem cdialeri 01/30/02 - 2184717
SQL> Rem cdialeri 01/11/02 - 9.2 - features 2
SQL> Rem cdialeri 11/30/01 - 9.2 - features 1
SQL> Rem cdialeri 04/22/01 - Undostat changes
SQL> Rem cdialeri 03/02/01 - 9.0
SQL> Rem cdialeri 09/12/00 - sp_1404195
SQL> Rem cdialeri 04/07/00 - 1261813
SQL> Rem cdialeri 03/20/00 - Support for purge
SQL> Rem cdialeri 02/16/00 - 1191805
SQL> Rem cdialeri 01/26/00 - 1169401
SQL> Rem cdialeri 11/01/99 - Enhance, 1059172
SQL> Rem cmlim 07/17/97 - Added STATS$SQLAREA to store top sql stmts
SQL> Rem gwood 10/16/95 - Version to run as sys without using many view
SQL> Rem cellis.uk 11/15/89 - Created
SQL> Rem
SQL>
SQL> set showmode off echo off;
If this script is automatically called from spcreate (which is
the supported method), all STATSPACK segments will be created in
the PERFSTAT user's default tablespace.
Using PERFSTAT tablespace to store Statspack objects
... Creating STATS$SNAPSHOT_ID Sequence
Sequence created.
create public synonym STATS$SNAPSHOT_ID for STATS$SNAPSHOT_ID
ERROR at line 1:
ORA-00955: name is already used by an existing object
Disconnected from Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
Kindly suggest on the same..
BR@?/rdbms/admin/spdrop
drop public synonym STATS$SNAPSHOT_ID;
try again -
Sliding window for historical data purge in multiple related tables
All,
It is a well known question of how to efficiently BACKUP and PURGE historical data based on a sliding window.
I have a group of tables, they all have to be backed up and purged based on a sliding time window. These tables have FKs related to each other and these FKs are not necessary the timestamp column. I am considering using partition based on the timestamp column for all these tables, so i can export those out of date partitions and then drop them. The price I have to pay by this design is that timestamp column is actually duplicated many times among parent table, child tables, grand-child tables although the value is the same, but I have to do the partition based on this column in all tables.
It's very much alike the statspack tables, one stats$snapshot and many child tables to store actual statistic data. I am just wondering how statspack.purge does this, since using DELETE statement is very inefficient and time consuming. In statspack tables, snap_time is only stored in stats$snapshot table, not everywhere in it's child table, and they are not partitioned. I guess the procedure is using DELETE statement.
Any thought on other good design options? Or how would you optimize statspack tables historical data backup and purge? Thanks!hey oracle gurus, any thoughts?
-
Hi,Experts,
If it is good practise that setup statspack on each RAC node using different schema and different job.
Thanks
Simon LaiSimon,
Sorry, that's not good practice, it is incorrect to do it this way.
All statspack tables register the instance_id of the instance the job was running on.
You need to install statspack in 1 schema, set up two different dbms_job calls, using the instance_id.
If you do it your way, all the data you gather is of no use.
Sybrand Bakker
Senior Oracle DBA -
Space used by a statspack snapshot
Is there an easy way to calculate the disk space used by 1 statspack snapshot?
Thanks,
Markvalues from dba_extents will get you a reasonable answer. One caution though - if you use a DELETE then run more snapshots you will find some interesting answers. Because delete does not free up the blocks they way a truncate command does.
I just recommend getting an idea of the sizes without having the delete command come into play on the stats$ tables. Otherwise, you will need some other techniques to get storage.
If you regularly analyze your database including these statspack tables you can capture the avg_row_len and num_rows from the dba_tables view and record this into a logging table that you can run comparisons over time. -
There will be a load on system
Dear Experts,
I am expecting more load in my application system today from 3PM onwards since unversity results are goin to be published so student will hit the system temendously.
i just wanted to record how may number session getting created during that period. how can i do that if there is any package doing that, please shart it with me.
Thanks
SalaiDepending on the Oracle version and whether you are licensed to use the AWR and/or whether you have installed and are using Statspack, you should be able to get information from either the AWR or the Statspack tables to answer that sort of question.
Be aware, however, that the number of sessions created is normally not a particularly good metric for most modern three-tier applications. Your middle tier probably maintains a pool of connections to service incoming requests and a large spike in traffic probably does not translate to a large increase in the size of those pools. Most likely, most of the spike in traffic will result from sessions getting re-used more frequently by the middle tier which is not something that the database can directly measure. You would generally be more interested in things like a change in the number of times particular statements or procedures were executed or changes in the execution time of different procedures due to load which will also be on your AWR/ Statspack report if you have either package available.
Justin -
Fetching queries that are running slow
Hi all,
Is there any tool in Oracle 9i, by which we can fetch queries that are running slow in the entire database on a weekly basis ?As mentioned, the statspack tables and the shared pool views from which they take their snapshots - V$SQL / V$SQLAREA - provided various ways for you to idenitify top N statements by cpu time, elapsed time, logical io, physical io, etc.
For a weekly basis, the statspack tables and statspack reports provided the easiest way to do this, a) providing you're capturing this data and b) depending on how long you're retaining it. -
Invalid values in 'Top Sessions'
I have a newly install OEM grid control and on the "Top Sessions" page for multiple databases, I am seeing 'bad' values for every session on numerous columns, i.e.
CPU (1/100 sec) 1127219200
Logical Reads 1106247680
Hard Parses 1127219200
Disk Sorts 5658315534953873408
I am getting these result against both 10.2.0.1 and 9.2.0.6 version databases. I have used 'Monitoring Configuration' to setup the dbsnmp user and install statspack. It seems to me as though I must have a bad version of the statspack tables or something.
Thanks for your help!I am also facing same issue.. in fact, in our case, all the values in the columns like Disk sorts, total parses, hard parses are all same for all the sessions.
And our target OS is
SunOS 5.9 Generic_118558-22 (64-bit) .
Would you please pos the bug number, so I can gather some more info. -
ARCH files generating frequently
Hi
My Databade is running in Archive log mode. I have started the script "sppurge.sql" which is present in RDBMS folder. But now i see a number of archived files generated. Is there any relation of geration of arch files with the above script????????
Again when the script completed the task, the generatin of ARCH files came back to normal.
Plz help me out.......
Thnx & Regards
Sunil Kumar Pandathat's normal behavior, sppurge.sql essentially did a batch of delete from statspack tables.
If you plan to remove all old snapshot (after you make a dump backup for example) you can use sptrunc.sql instead. It almost generate no redo log. -
Locate SQL causes full table scans from Statspack
Hello,
In my statspack reports I see a lot of full tables scans (1,425,297)
How can I locate the query that causes this ?
stats$sql_plan should fit?
Oracle is 9i
Thank you>
How can I locate the query that causes this ?
It can be hard. One idea is to put comments in queries identifying where they come from, something like
select /* my_package.my_procedure */ *
from dual;
[/code
The comment should remain with the sql text so various reports showing the sql text should also indicate where the query is] -
Hi.. i m tuning my Oracle Database, for that i need to install Statspack package, when i compiled package... it returned following error.
Warning: Package Body created with compilation errors.
SQL> show error
Errors for PACKAGE BODY STATSPACK:
LINE/COL ERROR
2045/3 PLS-00201: identifier 'SYS.DBMS_SHARED_POOL' must be declared
2045/3 PL/SQL: Statement ignored
HOw to solve above error..Please check the following Package, and do help me.
Note: I m connected perfstat user, no as SYS user.
create or replace package body STATSPACK as
/* Define package variables.
Variables prefixed with p_ are package variables.
p_snap_id integer; /* snapshot id */
p_instance_number number; /* instance number */
p_instance_name varchar2(16); /* instance name */
p_startup_time date; /* instance startup time */
p_parallel varchar2(3); /* parallel server */
p_version varchar2(17); /* Oracle release */
p_dbid number; /* database id */
p_host_name varchar2(64); /* host instance is on */
p_name varchar2(9); /* database name */
p_new_sga integer; /* Instance bounced since last snap? */
tmp_int integer; /* initialise defaults */
p_def_snap_level number default 5; /* default snapshot lvl */
p_def_session_id number default 0; /* default session id */
p_def_ucomment varchar2(160) default null;
p_def_pin_statspack varchar2(10) default 'TRUE';
p_def_last_modified date default SYSDATE;
/* Below are the default threshold (_th) values for choosing SQL statements
to store in the stats$sqlsummary table - these statements will typically
be the statements using the most resources.
p_def_num_sql number default 50; /* Num. SQL statements */
p_def_executions_th number default 100; /* Num. executions */
p_def_parse_calls_th number default 1000; /* Num. parse calls */
p_def_disk_reads_th number default 1000; /* Num. disk reads */
p_def_buffer_gets_th number default 10000; /* Num. buf gets */
p_def_sharable_mem_th number default 1048576; /* Sharable memory */
p_def_version_count_th number default 20; /* Child Cursors */
p_def_all_init varchar2(10) default 'FALSE';
cursor get_instance is
select instance_number, instance_name
, startup_time, parallel, version
, host_name
from v$instance;
cursor get_db is
select dbid, name
from v$database;
procedure SNAP
(i_snap_level in number default null
,i_session_id in number default null
,i_ucomment in varchar2 default null
,i_num_sql in number default null
,i_executions_th in number default null
,i_parse_calls_th in number default null
,i_disk_reads_th in number default null
,i_buffer_gets_th in number default null
,i_sharable_mem_th in number default null
,i_version_count_th in number default null
,i_all_init in varchar2 default null
,i_pin_statspack in varchar2 default null
,i_modify_parameter in varchar2 default 'FALSE'
is
/* Takes a snapshot by calling the SNAP function, and discards
the snapshot id. This is useful when automating taking
snapshots from dbms_job
l_snap_id number;
begin
l_snap_id := statspack.snap ( i_snap_level, i_session_id, i_ucomment
, i_num_sql
, i_executions_th
, i_parse_calls_th
, i_disk_reads_th
, i_buffer_gets_th
, i_sharable_mem_th
, i_version_count_th
, i_all_init
, i_pin_statspack
, i_modify_parameter);
end SNAP;
procedure MODIFY_STATSPACK_PARAMETER
( i_dbid in number default null
, i_instance_number in number default null
, i_snap_level in number default null
, i_session_id in number default null
, i_ucomment in varchar2 default null
, i_num_sql in number default null
, i_executions_th in number default null
, i_parse_calls_th in number default null
, i_disk_reads_th in number default null
, i_buffer_gets_th in number default null
, i_sharable_mem_th in number default null
, i_version_count_th in number default null
, i_all_init in varchar2 default null
, i_pin_statspack in varchar2 default null
, i_modify_parameter in varchar2 default 'TRUE'
is
/* Calls QAM with the modify flag, and discards the
output variables
l_snap_level number;
l_session_id number;
l_ucomment varchar2(160);
l_num_sql number;
l_executions_th number;
l_parse_calls_th number;
l_disk_reads_th number;
l_buffer_gets_th number;
l_sharable_mem_th number;
l_version_count_th number;
l_all_init varchar2(5);
l_pin_statspack varchar2(10);
begin
statspack.qam_statspack_parameter( i_dbid
, i_instance_number
, i_snap_level
, i_session_id
, i_ucomment
, i_num_sql
, i_executions_th
, i_parse_calls_th
, i_disk_reads_th
, i_buffer_gets_th
, i_sharable_mem_th
, i_version_count_th
, i_all_init
, i_pin_statspack
, 'TRUE'
, l_snap_level
, l_session_id
, l_ucomment
, l_num_sql
, l_executions_th
, l_parse_calls_th
, l_disk_reads_th
, l_buffer_gets_th
, l_sharable_mem_th
, l_version_count_th
, l_all_init
, l_pin_statspack);
/* As we have explicity been requested to change the parameters,
independently of taking a snapshot, commit
commit;
end MODIFY_STATSPACK_PARAMETER;
procedure QAM_STATSPACK_PARAMETER
( i_dbid in number default null
, i_instance_number in number default null
, i_snap_level in number default null
, i_session_id in number default null
, i_ucomment in varchar2 default null
, i_num_sql in number default null
, i_executions_th in number default null
, i_parse_calls_th in number default null
, i_disk_reads_th in number default null
, i_buffer_gets_th in number default null
, i_sharable_mem_th in number default null
, i_version_count_th in number default null
, i_all_init in varchar2 default null
, i_pin_statspack in varchar2 default null
, i_modify_parameter in varchar2 default 'FALSE'
, o_snap_level out number
, o_session_id out number
, o_ucomment out varchar2
, o_num_sql out number
, o_executions_th out number
, o_parse_calls_th out number
, o_disk_reads_th out number
, o_buffer_gets_th out number
, o_sharable_mem_th out number
, o_version_count_th out number
, o_all_init out varchar2
, o_pin_statspack out varchar2
is
/* Query And Modify statspack parameter procedure, allows query
and/or user modification of the statistics collection parameters
for an instance. If there are no pre-existing parameters for
an instance, insert the Oracle defaults.
l_instance_number number;
l_dbid number;
ui_all_init varchar2(5);
l_params_exist varchar2(1);
begin
if ((i_dbid is null ) or (i_instance_number is null)) then
l_dbid := p_dbid;
l_instance_number := p_instance_number;
else
l_dbid := i_dbid;
l_instance_number := i_instance_number;
end if;
/* Upper case any input vars which are inserted */
ui_all_init := upper(i_all_init);
if ( (i_modify_parameter is null)
or (upper(i_modify_parameter) = 'FALSE') ) then
/* Query values, if none exist, insert the defaults tempered
with variables supplied */
begin
select nvl(i_session_id, session_id)
, nvl(i_snap_level, snap_level)
, nvl(i_ucomment, ucomment)
, nvl(i_num_sql, num_sql)
, nvl(i_executions_th, executions_th)
, nvl(i_parse_calls_th, parse_calls_th)
, nvl(i_disk_reads_th, disk_reads_th)
, nvl(i_buffer_gets_th, buffer_gets_th)
, nvl(i_sharable_mem_th, sharable_mem_th)
, nvl(i_version_count_th, version_count_th)
, nvl(ui_all_init, all_init)
, nvl(i_pin_statspack, pin_statspack)
into o_session_id
, o_snap_level
, o_ucomment
, o_num_sql
, o_executions_th
, o_parse_calls_th
, o_disk_reads_th
, o_buffer_gets_th
, o_sharable_mem_th
, o_version_count_th
, o_all_init
, o_pin_statspack
from stats$statspack_parameter
where instance_number = l_instance_number
and dbid = l_dbid;
exception
when NO_DATA_FOUND then
insert into stats$statspack_parameter
( dbid
, instance_number
, session_id
, snap_level
, ucomment
, num_sql
, executions_th
, parse_calls_th
, disk_reads_th
, buffer_gets_th
, sharable_mem_th
, version_count_th
, all_init
, pin_statspack
, last_modified
values
( l_dbid
, l_instance_number
, p_def_session_id
, p_def_snap_level
, p_def_ucomment
, p_def_num_sql
, p_def_executions_th
, p_def_parse_calls_th
, p_def_disk_reads_th
, p_def_buffer_gets_th
, p_def_sharable_mem_th
, p_def_version_count_th
, p_def_all_init
, p_def_pin_statspack
, SYSDATE
returning nvl(i_session_id, p_def_session_id)
, nvl(i_snap_level, p_def_snap_level)
, nvl(i_ucomment, p_def_ucomment)
, nvl(i_num_sql, p_def_num_sql)
, nvl(i_executions_th, p_def_executions_th)
, nvl(i_parse_calls_th, p_def_parse_calls_th)
, nvl(i_disk_reads_th, p_def_disk_reads_th)
, nvl(i_buffer_gets_th, p_def_buffer_gets_th)
, nvl(i_sharable_mem_th, p_def_sharable_mem_th)
, nvl(i_version_count_th, p_def_version_count_th)
, nvl(ui_all_init, p_def_all_init)
, nvl(i_pin_statspack, p_def_pin_statspack)
into o_session_id
, o_snap_level
, o_ucomment
, o_num_sql
, o_executions_th
, o_parse_calls_th
, o_disk_reads_th
, o_buffer_gets_th
, o_sharable_mem_th
, o_version_count_th
, o_all_init
, o_pin_statspack;
end; /* don't modify parameter values */
elsif upper(i_modify_parameter) = 'TRUE' then
/* modify values, if none exist, insert the defaults tempered
with the variables supplied */
begin
update stats$statspack_parameter
set session_id = nvl(i_session_id, session_id)
, snap_level = nvl(i_snap_level, snap_level)
, ucomment = nvl(i_ucomment, ucomment)
, num_sql = nvl(i_num_sql, num_sql)
, executions_th = nvl(i_executions_th, executions_th)
, parse_calls_th = nvl(i_parse_calls_th, parse_calls_th)
, disk_reads_th = nvl(i_disk_reads_th, disk_reads_th)
, buffer_gets_th = nvl(i_buffer_gets_th, buffer_gets_th)
, sharable_mem_th = nvl(i_sharable_mem_th, sharable_mem_th)
, version_count_th = nvl(i_version_count_th, version_count_th)
, all_init = nvl(ui_all_init, all_init)
, pin_statspack = nvl(i_pin_statspack, pin_statspack)
where instance_number = l_instance_number
and dbid = l_dbid
returning session_id
, snap_level
, ucomment
, num_sql
, executions_th
, parse_calls_th
, disk_reads_th
, buffer_gets_th
, sharable_mem_th
, version_count_th
, all_init
, pin_statspack
into o_session_id
, o_snap_level
, o_ucomment
, o_num_sql
, o_executions_th
, o_parse_calls_th
, o_disk_reads_th
, o_buffer_gets_th
, o_sharable_mem_th
, o_version_count_th
, o_all_init
, o_pin_statspack;
if SQL%ROWCOUNT = 0 then
insert into stats$statspack_parameter
( dbid
, instance_number
, session_id
, snap_level
, ucomment
, num_sql
, executions_th
, parse_calls_th
, disk_reads_th
, buffer_gets_th
, sharable_mem_th
, version_count_th
, all_init
, pin_statspack
, last_modified
values
( l_dbid
, l_instance_number
, nvl(i_session_id, p_def_session_id)
, nvl(i_snap_level, p_def_snap_level)
, nvl(i_ucomment, p_def_ucomment)
, nvl(i_num_sql, p_def_num_sql)
, nvl(i_executions_th, p_def_executions_th)
, nvl(i_parse_calls_th, p_def_parse_calls_th)
, nvl(i_disk_reads_th, p_def_disk_reads_th)
, nvl(i_buffer_gets_th, p_def_buffer_gets_th)
, nvl(i_sharable_mem_th, p_def_sharable_mem_th)
, nvl(i_version_count_th, p_def_version_count_th)
, nvl(ui_all_init, p_def_all_init)
, nvl(i_pin_statspack, p_def_pin_statspack)
, SYSDATE
returning session_id
, snap_level
, ucomment
, num_sql
, executions_th
, parse_calls_th
, disk_reads_th
, buffer_gets_th
, sharable_mem_th
, version_count_th
, all_init
, pin_statspack
into o_session_id
, o_snap_level
, o_ucomment
, o_num_sql
, o_executions_th
, o_parse_calls_th
, o_disk_reads_th
, o_buffer_gets_th
, o_sharable_mem_th
, o_version_count_th
, o_all_init
, o_pin_statspack;
end if;
end; /* modify values */
else
/* error */
raise_application_error
(-20100,'QAM_STATSPACK_PARAMETER i_modify_parameter value is invalid');
end if; /* modify */
end QAM_STATSPACK_PARAMETER;
procedure STAT_CHANGES
/* Returns a set of differences of the values from corresponding pairs
of rows in STATS$SYSSTAT, STATS$LIBRARYCACHE and STATS$WAITSTAT,
based on the begin and end (bid, eid) snapshot id's specified.
This procedure is the only call to STATSPACK made by the statsrep
report.
Modified to include multi-db support.
( bid IN number
, eid IN number
, db_ident IN number
, inst_num IN number
, parallel IN varchar2
, lhtr OUT number, bfwt OUT number
, tran OUT number, chng OUT number
, ucal OUT number, urol OUT number
, rsiz OUT number
, phyr OUT number, phyrd OUT number
, phyrdl OUT number
, phyw OUT number, ucom OUT number
, prse OUT number, hprse OUT number
, recr OUT number, gets OUT number
, rlsr OUT number, rent OUT number
, srtm OUT number, srtd OUT number
, srtr OUT number, strn OUT number
, lhr OUT number, bc OUT varchar2
, sp OUT varchar2, lb OUT varchar2
, bs OUT varchar2, twt OUT number
, logc OUT number, prscpu OUT number
, tcpu OUT number, exe OUT number
, prsela OUT number
, bspm OUT number, espm OUT number
, bfrm OUT number, efrm OUT number
, blog OUT number, elog OUT number
, bocur OUT number, eocur OUT number
, dmsd OUT number, dmfc OUT number -- begin OPS
, dfcms OUT number, dfcmr OUT number
, dmsi OUT number, dmrv OUT number
, dynal OUT number, dynares OUT number
, pmrv OUT number, pmpt OUT number
, npmrv OUT number, npmpt OUT number
, scma OUT number, scml OUT number
, pinc OUT number, picrnc OUT number
, picc OUT number, picrcc OUT number
, pbc OUT number, pbcrc OUT number
, pcba OUT number, pccrba OUT number
, pcrbpi OUT number
, dynapres OUT number, dynapshl OUT number
, prcma OUT number, prcml OUT number
, pwrm OUT number, pfpim OUT number
, pwnm OUT number
, dpms OUT number, dnpms OUT number
, glsg OUT number, glag OUT number
, glgt OUT number, glsc OUT number
, glac OUT number, glct OUT number
, glrl OUT number
, gcge OUT number, gcgt OUT number
, gccv OUT number, gcct OUT number
, gccrrv OUT number, gccrrt OUT number
, gccurv OUT number, gccurt OUT number
, gccrsv OUT number
, gccrbt OUT number, gccrft OUT number
, gccrst OUT number, gccusv OUT number
, gccupt OUT number, gccuft OUT number
, gccust OUT number -- end OPS
) is
bval number;
eval number;
l_b_session_id number; /* begin session id */
l_b_serial# number; /* begin serial# */
l_e_session_id number; /* end session id */
l_e_serial# number; /* end serial# */
function LIBRARYCACHE_HITRATIO RETURN number is
/* Returns Library cache hit ratio for the begin and end (bid, eid)
snapshot id's specified
cursor LH (i_snap_id number) is
select sum(pins), sum(pinhits)
from stats$librarycache
where snap_id = i_snap_id
and dbid = db_ident
and instance_number = inst_num;
bpsum number;
bhsum number;
epsum number;
ehsum number;
begin
if not LH%ISOPEN then open LH (bid); end if;
fetch LH into bpsum, bhsum;
if LH%NOTFOUND then
raise_application_error
(-20100,'Missing start value for stats$librarycache');
end if; close LH;
if not LH%ISOPEN then open LH (eid); end if;
fetch LH into epsum, ehsum;
if LH%NOTFOUND then
raise_application_error
(-20100,'Missing end value for stats$librarycache');
end if; close LH;
return (ehsum - bhsum) / (epsum - bpsum);
end LIBRARYCACHE_HITRATIO;
function GET_PARAM (i_name varchar2) RETURN varchar2 is
/* Returns the value for the init.ora parameter for the snapshot
specified.
cursor PARAMETER is
select value
from stats$parameter
where snap_id = eid
and dbid = db_ident
and instance_number = inst_num
and name = i_name;
par_value varchar2(512);
begin
if not PARAMETER%ISOPEN then open PARAMETER; end if;
fetch PARAMETER into par_value;
if PARAMETER%NOTFOUND then
raise_application_error
(-20100,'Missing Init.ora parameter '|| i_name);
end if; close PARAMETER;
return par_value;
end GET_PARAM;
function GET_SYSSTAT (i_name varchar2, i_beid number) RETURN number is
/* Returns the value for the System Statistic for the snapshot
specified.
cursor SYSSTAT is
select value
from stats$sysstat
where snap_id = i_beid
and dbid = db_ident
and instance_number = inst_num
and name = i_name;
stat_value varchar2(512);
begin
if not SYSSTAT%ISOPEN then open SYSSTAT; end if;
fetch SYSSTAT into stat_value;
if SYSSTAT%NOTFOUND then
raise_application_error
(-20100,'Missing System Statistic '|| i_name);
end if; close SYSSTAT;
return stat_value;
end GET_SYSSTAT;
function BUFFER_WAITS RETURN number is
/* Returns the total number of waits for all buffers in the interval
specified by the begin and end snapshot id's (bid, eid)
cursor BW (i_snap_id number) is
select sum(wait_count)
from stats$waitstat
where snap_id = i_snap_id
and dbid = db_ident
and instance_number = inst_num;
bbwsum number; ebwsum number;
begin
if not BW%ISOPEN then open BW (bid); end if;
fetch BW into bbwsum;
if BW%NOTFOUND then
raise_application_error
(-20100,'Missing start value for stats$waitstat');
end if; close BW;
if not BW%ISOPEN then open BW (eid); end if;
fetch BW into ebwsum;
if BW%NOTFOUND then
raise_application_error
(-20100,'Missing end value for stats$waitstat');
end if; close BW;
return ebwsum - bbwsum;
end BUFFER_WAITS;
function TOTAL_EVENT_TIME RETURN number is
/* Returns the total amount of time waited for events for
the interval specified by the begin and end snapshot id's
(bid, eid) by foreground processes. This excludes idle
wait events.
cursor WAITS (i_snap_id number) is
select sum(time_waited_micro)
from stats$system_event
where snap_id = i_snap_id
and dbid = db_ident
and instance_number = inst_num
and event not in (select event from stats$idle_event);
bwaittime number;
ewaittime number;
begin
if not WAITS%ISOPEN then open WAITS (bid); end if;
fetch WAITS into bwaittime;
if WAITS%NOTFOUND then
raise_application_error
(-20100,'Missing start value for stats$system_event');
end if; close WAITS;
if not WAITS%ISOPEN then open WAITS (eid); end if;
fetch WAITS into ewaittime;
if WAITS%NOTFOUND then
raise_application_error
(-20100,'Missing end value for stats$system_event');
end if; close WAITS;
return ewaittime - bwaittime;
end TOTAL_EVENT_TIME;
function LATCH_HITRATIO return NUMBER is
/* Returns the latch hit ratio specified by the begin and
end snapshot id's (bid, eid)
cursor GETS_MISSES (i_snap_id number) is
select sum(gets), sum(misses)
from stats$latch
where snap_id = i_snap_id
and dbid = db_ident
and instance_number = inst_num;
blget number; -- beginning latch gets
blmis number; -- beginning latch misses
elget number; -- end latch gets
elmis number; -- end latch misses
begin
if not GETS_MISSES%ISOPEN then open GETS_MISSES (bid); end if;
fetch GETS_MISSES into blget, blmis;
if GETS_MISSES%NOTFOUND then
raise_application_error
(-20100,'Missing start value for STATS$LATCH gets and misses');
end if; close GETS_MISSES;
if not GETS_MISSES%ISOPEN then open GETS_MISSES (eid); end if;
fetch GETS_MISSES into elget, elmis;
if GETS_MISSES%NOTFOUND then
raise_application_error
(-20100,'Missing end value for STATS$LATCH gets and misses');
end if; close GETS_MISSES;
return ( ( elmis - blmis ) / ( elget - blget ) );
end LATCH_HITRATIO;
function SGASTAT (i_name varchar2, i_beid number) RETURN number is
/* Returns the bytes used by i_name in the shared pool
for the begin or end snapshot (bid, eid) specified
cursor bytes_used is
select bytes
from stats$sgastat
where snap_id = i_beid
and dbid = db_ident
and instance_number = inst_num
and pool in ('shared pool', 'all pools')
and name = i_name;
total_bytes number;
begin
if i_name = 'total_shared_pool' then
select sum(bytes)
into total_bytes
from stats$sgastat
where snap_id = i_beid
and dbid = db_ident
and instance_number = inst_num
and pool in ('shared pool','all pools');
else
open bytes_used; fetch bytes_used into total_bytes;
if bytes_used%notfound then
raise_application_error
(-20100,'Missing value for SGASTAT: '||i_name);
end if;
close bytes_used;
end if;
return total_bytes;
end SGASTAT;
function SYSDIF (i_name varchar2) RETURN number is
/* Returns the difference between statistics for the statistic
name specified for the interval between the begin and end
snapshot id's (bid, eid)
cursor SY (i_snap_id number) is
select value
from stats$sysstat
where snap_id = i_snap_id
and dbid = db_ident
and instance_number = inst_num
and name = i_name;
begin
/* Get start value */
open SY (bid); fetch SY into bval;
if SY%notfound then
raise_application_error
(-20100,'Missing start value for statistic: '||i_name);
end if; close SY;
/* Get end value */
open SY (eid); fetch SY into eval;
if SY%notfound then
raise_application_error
(-20100,'Missing end value for statistic: '||i_name);
end if; close SY;
/* Return difference */
return eval - bval;
end SYSDIF;
function SESDIF (st_name varchar2) RETURN number is
/* Returns the difference between statistics values for the
statistic name specified for the interval between the begin and end
snapshot id's (bid, eid), for the session monitored for that
snapshot
cursor SE (i_snap_id number) is
select ses.value
from stats$sysstat sys
, stats$sesstat ses
where sys.snap_id = i_snap_id
and ses.snap_id = i_snap_id
and ses.dbid = db_ident
and sys.dbid = db_ident
and ses.instance_number = inst_num
and sys.instance_number = inst_num
and ses.statistic# = sys.statistic#
and sys.name = st_name;
begin
/* Get start value */
open SE (bid); fetch SE into bval;
if SE%notfound then
eval :=0;
end if; close SE;
/* Get end value */
open SE (eid); fetch SE into eval;
if SE%notfound then
eval :=0;
end if; close SE;
/* Return difference */
return eval - bval;
end SESDIF;
function DLMDIF (i_name varchar2) RETURN number is
/* Returns the difference between statistics for the statistic
name specified for the interval between the begin and end
snapshot id's (bid, eid)
cursor DLM (i_snap_id number) is
select value
from stats$dlm_misc
where snap_id = i_snap_id
and dbid = db_ident
and instance_number = inst_num
and name = i_name;
begin
/* Get start value */
open DLM (bid); fetch DLM into bval;
if DLM%notfound then
raise_application_error
(-20100,'Missing start value for statistic: '||i_name);
end if; close DLM;
/* Get end value */
open DLM (eid); fetch DLM into eval;
if DLM%notfound then
raise_application_error
(-20100,'Missing end value for statistic: '||i_name);
end if; close DLM;
/* Return difference */
return eval - bval;
end DLMDIF;
begin /* main procedure body of STAT_CHANGES */
lhtr := LIBRARYCACHE_HITRATIO;
bfwt := BUFFER_WAITS;
lhr := LATCH_HITRATIO;
chng := SYSDIF('db block changes');
ucal := SYSDIF('user calls');
urol := SYSDIF('user rollbacks');
ucom := SYSDIF('user commits');
tran := ucom + urol;
rsiz := SYSDIF('redo size');
phyr := SYSDIF('physical reads');
phyrd := SYSDIF('physical reads direct');
phyrdl := SYSDIF('physical reads direct (lob)');
phyw := SYSDIF('physical writes');
hprse := SYSDIF('parse count (hard)');
prse := SYSDIF('parse count (total)');
gets := SYSDIF('session logical reads');
recr := SYSDIF('recursive calls');
rlsr := SYSDIF('redo log space requests');
rent := SYSDIF('redo entries');
srtm := SYSDIF('sorts (memory)');
srtd := SYSDIF('sorts (disk)');
srtr := SYSDIF('sorts (rows)');
logc := SYSDIF('logons cumulative');
prscpu := SYSDIF('parse time cpu');
prsela := SYSDIF('parse time elapsed');
tcpu := SYSDIF('CPU used by this session');
exe := SYSDIF('execute count');
bs := GET_PARAM('db_block_size');
bc := GET_PARAM('db_block_buffers') * bs;
if bc = 0 then
bc := GET_PARAM('db_cache_size')
+ GET_PARAM('db_keep_cache_size')
+ GET_PARAM('db_recycle_cache_size')
+ GET_PARAM('db_2k_cache_size')
+ GET_PARAM('db_4k_cache_size')
+ GET_PARAM('db_8k_cache_size')
+ GET_PARAM('db_16k_cache_size')
+ GET_PARAM('db_32k_cache_size');
end if;
sp := GET_PARAM('shared_pool_size');
lb := GET_PARAM('log_buffer');
twt := TOTAL_EVENT_TIME; -- total wait time for all non-idle events
bspm := SGASTAT('total_shared_pool', bid);
espm := SGASTAT('total_shared_pool', eid);
bfrm := SGASTAT('free memory', bid);
efrm := SGASTAT('free memory', eid);
blog := GET_SYSSTAT('logons current', bid);
elog := GET_SYSSTAT('logons current', eid);
bocur := GET_SYSSTAT('opened cursors current', bid);
eocur := GET_SYSSTAT('opened cursors current', eid);
/* Do we want to report on cluster-specific statistics? Check
in procedure variable "parallel".
if parallel = 'YES' then
dmsd := DLMDIF('messages sent directly');
dmfc := DLMDIF('messages flow controlled');
dmsi := DLMDIF('messages sent indirectly');
dmrv := DLMDIF('messages received');
dfcms := DLMDIF('flow control messages sent');
dfcmr := DLMDIF('flow control messages received');
dynal := DLMDIF('dynamically allocated enqueues');
dynares := DLMDIF('dynamically allocated resources');
pmrv := DLMDIF('gcs msgs received');
pmpt := DLMDIF('gcs msgs process time(ms)');
npmrv := DLMDIF('ges msgs received');
npmpt := DLMDIF('ges msgs process time(ms)');
scma := DLMDIF('gcs side channel msgs actual');
scml := DLMDIF('gcs side channel msgs logical');
pinc := DLMDIF('gcs immediate (null) converts');
picrnc := DLMDIF('gcs immediate cr (null) converts');
picc := DLMDIF('gcs immediate (compatible) converts');
picrcc := DLMDIF('gcs immediate cr (compatible) converts');
pbc := DLMDIF('gcs blocked converts');
pbcrc := DLMDIF('gcs blocked cr converts');
pcba := DLMDIF('gcs compatible basts');
pccrba := DLMDIF('gcs compatible cr basts');
pcrbpi := DLMDIF('gcs cr basts to PIs');
dynapres := DLMDIF('dynamically allocated gcs resources');
dynapshl := DLMDIF('dynamically allocated gcs shadows');
prcma := DLMDIF('gcs recovery claim msgs actual');
prcml := DLMDIF('gcs recovery claim msgs logical');
pwrm := DLMDIF('gcs write request msgs');
pfpim := DLMDIF('gcs flush pi msgs');
pwnm := DLMDIF('gcs write notification msgs');
dpms := SYSDIF('gcs messages sent');
dnpms := SYSDIF('ges messages sent');
glsg := SYSDIF('global lock sync gets');
glag := SYSDIF('global lock async gets');
glgt := SYSDIF('global lock get time');
glsc := SYSDIF('global lock sync converts');
glac := SYSDIF('global lock async converts');
glct := SYSDIF('global lock convert time');
glrl := SYSDIF('global lock releases');
gcge := SYSDIF('global cache gets');
gcgt := SYSDIF('global cache get time');
gccv := SYSDIF('global cache converts');
gcct := SYSDIF('global cache convert time');
gccrrv := SYSDIF('global cache cr blocks received');
gccrrt := SYSDIF('global cache cr block receive time');
gccurv := SYSDIF('global cache current blocks received');
gccurt := SYSDIF('global cache current block receive time');
gccrsv := SYSDIF('global cache cr blocks served');
gccrbt := SYSDIF('global cache cr block build time');
gccrft := SYSDIF('global cache cr block flush time');
gccrst := SYSDIF('global cache cr block send time');
gccusv := SYSDIF('global cache current blocks served');
gccupt := SYSDIF('global cache current block pin time');
gccuft := SYSDIF('global cache current block flush time');
gccust := SYSDIF('global cache current block send time');
end if;
/* Determine if we want to report on session-specific statistics.
Check that the session is the same one for both snapshots.
select session_id
, serial#
into l_b_session_id
, l_b_serial#
from stats$snapshot
where snap_id = bid
and dbid = db_ident
and instance_number = inst_num;
select session_id
, serial#
into l_e_session_id
, l_e_serial#
from stats$snapshot
where snap_id = eid
and dbid = db_ident
and instance_number = inst_num;
if ( (l_b_session_id = l_e_session_id)
and (l_b_serial# = l_e_serial#)
and (l_b_session_id != 0) ) then
/* we have a valid comparison - it is the
same session - get number of tx performed
by this session */
strn := SESDIF('user rollbacks') + SESDIF('user commits');
if strn = 0 then
/* No new transactions */
strn := 1;
end if;
else
/* No valid comparison can be made */
strn :=1;
end if;
end STAT_CHANGES;
function SNAP
(i_snap_level in number default null
,i_session_id in number default null
,i_ucomment in varchar2 default null
,i_num_sql in number default null
,i_executions_th in number default null
,i_parse_calls_th in number default null
,i_disk_reads_th in number default null
,i_buffer_gets_th in number default null
,i_sharable_mem_th in number default null
,i_version_count_th in number default null
,i_all_init in varchar2 default null
,i_pin_statspack in varchar2 default null
,i_modify_parameter in varchar2 default 'FALSE'
RETURN integer IS
/* This function performs a snapshot of the v$ views into the
stats$ tables, and returns the snapshot id.
If parameters are passed, these are the values used, otherwise
the values stored in the stats$statspack_parameter table are used.
l_snap_id integer;
l_snap_level number;
l_session_id number;
l_serial# number;
l_ucomment varchar2(160);
l_num_sql number;
l_executions_th number;
l_parse_calls_th number;
l_disk_reads_th number;
l_buffer_gets_th number;
l_sharable_mem_th number;
l_version_count_th number;
l_all_init varchar2(5);
l_pin_statspack varchar2(10);
l_sql_stmt varchar2(3000);
l_slarti varchar2(20);
l_threshold number;
l_total_sql number := 0;
l_total_sql_mem number := 0;
l_single_use_sql number := 0;
l_single_use_sql_mem number := 0;
l_text_subset varchar2(31);
l_sharable_mem number;
l_version_count number;
l_sorts number;
l_module varchar2(64);
l_loaded_versions number;
l_executions number;
l_loads number;
l_invalidations number;
l_parse_calls number;
l_disk_reads number;
l_buffer_gets number;
l_rows_processed number;
l_address raw(8);
l_hash_value number;
l_version_count number;
l_max_begin_time date;
cursor GETSERIAL is
select serial#
from v$session
where sid = l_session_id;
PROCEDURE snap_sql IS
begin
/* Gather summary statistics */
insert into stats$sql_statistics
( snap_id
, dbid
, instance_number
, total_sql
, total_sql_mem
, single_use_sql
, single_use_sql_mem
select l_snap_id
, p_dbid
, p_instance_number
, count(1)
, sum(sharable_mem)
, sum(decode(executions, 1, 1, 0))
, sum(decode(executions, 1, sharable_mem, 0))
from stats$v$sqlxs
where is_obsolete = 'N';
/* Gather SQL statements which exceed any threshold,
excluding obsolete parent cursors
insert into stats$sql_summary
( snap_id
, dbid
, instance_number
, text_subset
, sharable_mem
, sorts
, module
, loaded_versions
, executions
, loads
, invalidations
, parse_calls
, disk_reads
, buffer_gets
, rows_processed
, command_type
, address
, hash_value
, version_count
, cpu_time
, elapsed_time
, outline_sid
, outline_category
select l_snap_id
, p_dbid
, p_instance_number
, substr(sql_text,1,31)
, sharable_mem
, sorts
, module
, loaded_versions
, executions
, loads
, invalidations
, parse_calls
, disk_reads
, buffer_gets
, rows_processed
, command_type
, address
, hash_value
, version_count
, cpu_time
, elapsed_time
, outline_sid
, outline_category
from stats$v$sqlxs
where is_obsolete = 'N'
and ( buffer_gets > l_buffer_gets_th
or disk_reads > l_disk_reads_th
or parse_calls > l_parse_calls_th
or executions > l_executions_th
or sharable_mem > l_sharable_mem_th
or version_count > l_version_count_th
/* Insert the SQL Text for hash_values captured in the snapshot
into stats$sqltext if it's not already there. Identify SQL which
execeeded the threshold by querying stats$sql_summary for this
snapid and database instance
insert into stats$sqltext
( hash_value
, text_subset
, piece
, sql_text
, address
, command_type
, last_snap_id
select st1.hash_value
, ss.text_subset
, st1.piece
, st1.sql_text
, st1.address
, st1.command_type
, ss.snap_id
from v$sqltext st1
, stats$sql_summary ss
where ss.snap_id = l_snap_id
and ss.dbid = p_dbid
and ss.instance_number = p_instance_number
and st1.hash_value = ss.hash_value
and st1.address = ss.address
and not exists (select 1
from stats$sqltext st2
where st2.hash_value = ss.hash_value
and st2.text_subset = ss.text_subset
IF l_snap_level >= 6 THEN
/* Identify SQL which execeeded the threshold by querying
stats$sql_summary for this snapid and database instance.
Capture the plans which were used for the high-load SQL if
don't already have this data.
Omit capturing plan usage information for cursors which
have a zero plan hash value.
Currently this is captured in a level 6 (or greater)
snapshot, however this may be integrated into level 5
snapshot at a later date.
hl - high load
insert into stats$sql_plan_usage
( hash_value
, text_subset
, plan_hash_value
, cost
, snap_id
, address
, optimizer
select hl.hash_value
, hl.text_subset
, hl.plan_hash_value
, hl.cost
, max(hl.snap_id)
, max(hl.address)
, max(hl.optimizer)
from (select /*+ ordered use_nl(sq) index(sq) */
ss.hash_value
, ss.text_subset
, sq.plan_hash_value
, nvl(sq.optimizer_cost,-9) cost
, ss.snap_id snap_id
, ss.address
, sq.optimizer_mode optimizer
from stats$sql_summary ss
, v$sql sq
where ss.snap_id = l_snap_id
and ss.dbid = p_dbid
and ss.instance_number = p_instance_number
and sq.hash_value = ss.hash_value
and sq.address = ss.address
and sq.plan_hash_value > 0
) hl
where not exists (select /*+ no_unnest */
from stats$sql_plan_usage spu
where spu.hash_value = hl.hash_value
and spu.text_subset = hl.text_subset
and spu.plan_hash_value
= hl.plan_hash_value
and spu.cost = hl.cost
group by hl.hash_value
, hl.text_subset
, hl.plan_hash_value
, hl.cost
, hl.optimizer;
/* For all new hash_value, plan_hash_value, cost combinations
just captured, get the optimizer plans, if we don't already
have them. Note that the plan (and hence the plan hash value)
comprises the access path and the join order (and not
variable factors such as the cardinality).
insert into stats$sql_plan
( plan_hash_value
, id
, operation
, options
, object_node
, object#
, object_owner
, object_name
, optimizer
, parent_id
, depth
, position
, cost
, cardinality
, bytes
, other_tag
, partition_start
, partition_stop
, partition_id
, other
, distribution
, cpu_cost
, io_cost
, temp_space
, snap_id
select /*+ ordered use_nl(s) use_nl(sp.p) */
new_plan.plan_hash_value
, sp.id
, max(sp.operation)
, max(sp.options)
, max(sp.object_node)
, max(sp.object#)
, max(sp.object_owner)
, max(sp.object_name)
, max(sp.optimizer)
, max(sp.parent_id)
, max(sp.depth)
, max(sp.position)
, max(sp.cost)
, max(sp.cardinality)
, max(sp.bytes)
, max(sp.other_tag)
, max(sp.partition_start)
, max(sp.partition_stop)
, max(sp.partition_id)
, max(sp.other)
, max(sp.distribution)
, max(sp.cpu_cost)
, max(sp.io_cost)
, max(sp.temp_space)
, max(new_plan.snap_id)
from (select /*+ index(spu) */
distinct
spu.plan_hash_value
, spu.hash_value
, spu.address
, spu.text_subset
, spu.snap_id
from stats$sql_plan_usage spu
where spu.snap_id = l_snap_id
and not exists (select /*+ nl_aj */ *
from stats$sql_plan ssp
where ssp.plan_hash_value
= spu.plan_hash_value
) new_plan
, v$sql s
, v$sql_plan sp
where sp.hash_value = new_plan.hash_value
and sp.address = new_plan.address
and s.hash_value = new_plan.hash_value
and s.address = new_plan.address
and s.hash_value = sp.hash_value
and s.address = sp.address
and s.child_number = sp.child_number
group by
new_plan.plan_hash_value
, sp.id;
END IF; /* snap level >=6 */
END snap_sql;
begin /* Function SNAP */
/* Get instance parameter defaults from stats$statspack_parameter,
or use supplied parameters.
If all parameters are specified, use them, otherwise get values
from the parameters not specified from stats$statspack_parameter.
statspack.qam_statspack_parameter
( p_dbid
, p_instance_number
, i_snap_level, i_session_id, i_ucomment, i_num_sql
, i_executions_th, i_parse_calls_th
, i_disk_reads_th, i_buffer_gets_th, i_sharable_mem_th
, i_version_count_th, i_all_init
, i_pin_statspack
, i_modify_parameter
, l_snap_level, l_session_id, l_ucomment, l_num_sql
, l_executions_th, l_parse_calls_th
, l_disk_reads_th, l_buffer_gets_th, l_sharable_mem_th
, l_version_count_th, l_all_init
, l_pin_statspack);
/* Generate a snapshot id */
select stats$snapshot_id.nextval
into l_snap_id
from dual
where rownum = 1;
/* Determine the serial# of the session to maintain stats for,
if this was requested.
if l_session_id > 0 then
if not GETSERIAL%ISOPEN then open GETSERIAL; end if;
fetch GETSERIAL into l_serial#;
if GETSERIAL%NOTFOUND then
/* Session has already disappeared - don't gather
statistics for this session in this snapshot */
l_session_id := 0;
l_serial# := 0;
end if; close GETSERIAL;
else
l_serial# := 0;
end if;
/* The instance has been restarted since the last snapshot */
if p_new_sga = 0
then
begin
p_new_sga := 1;
/* Get the instance startup time, and other characteristics */
insert into stats$database_instance
( dbid
, instance_number
, startup_time
, snap_id
, parallel
, version
, db_name
, instance_name
, host_name
select p_dbid
, p_instance_number
, p_startup_time
, l_snap_id
, p_parallel
, p_version
, p_name
, p_instance_name
, p_host_name
from sys.dual;
commit;
end;
end if; /* new SGA */
/* Work out the max undo stat time, used for gathering undo stat data */
select nvl(max(begin_time), to_date('01011900','DDMMYYYY'))
into l_max_begin_time
from stats$undostat
where dbid = p_dbid
and instance_number = p_instance_number;
/* Save the snapshot characteristics */
insert into stats$snapshot
( snap_id, dbid, instance_number
, snap_time, startup_time
, session_id, snap_level, ucomment
, executions_th, parse_calls_th, disk_reads_th
, buffer_gets_th, sharable_mem_th
, version_count_th, serial#, all_init)
values
( l_snap_id, p_dbid, p_instance_number
, SYSDATE, p_startup_time
, l_session_id, l_snap_level, l_ucomment
, l_executions_th, l_parse_calls_th, l_disk_reads_th
, l_buffer_gets_th, l_sharable_mem_th
, l_version_count_th, l_serial#, l_all_init);
/* Begin gathering statistics */
insert into stats$filestatxs
( snap_id
, dbid
, instance_number
, tsname
, filename
, phyrds
, phywrts
, singleblkrds
, readtim
, writetim
, singleblkrdtim
, phyblkrd
, phyblkwrt
, wait_count
, time
select l_snap_id
, p_dbid
, p_instance_number
, tsname
, filename
, phyrds
, phywrts
, singleblkrds
, readtim
, writetim
, singleblkrdtim
, phyblkrd
, phyblkwrt
, wait_count
, time
from stats$v$filestatxs;
insert into stats$tempstatxs
( snap_id
, dbid
, instance_number
, tsname
, filename
, phyrds
, phywrts
, singleblkrds
, readtim
, writetim
, singleblkrdtim
, phyblkrd
, phyblkwrt
, wait_count
, time
select l_snap_id
, p_dbid
, p_instance_number
, tsname
, filename
, phyrds
, phywrts
, singleblkrds
, readtim
, writetim
, singleblkrdtim
, phyblkrd
, phyblkwrt
, wait_count
, time
from stats$v$tempstatxs;
insert into stats$librarycache
( snap_id
, dbid
, instance_number
, namespace
, gets
, gethits
, pins
, pinhits
, reloads
, invalidations
, dlm_lock_requests
, dlm_pin_requests
, dlm_pin_releases
, dlm_invalidation_requests
, dlm_invalidations
select l_snap_id
, p_dbid
, p_instance_number
, namespace
, gets
, gethits
, pins
, pinhits
, reloads
, invalidations
, dlm_lock_requests
, dlm_pin_requests
, dlm_pin_releases
, dlm_invalidation_requests
, dlm_invalidations
from v$librarycache;
insert into stats$buffer_pool_statistics
( snap_id
, dbid
, instance_number
, id
, name
, block_size
, set_msize
, cnum_repl
, cnum_write
, cnum_set
, buf_got
, sum_write
, sum_scan
, free_buffer_wait
, write_complete_wait
, buffer_busy_wait
, free_buffer_inspected
, dirty_buffers_inspected
, db_block_change
, db_block_gets
, consistent_gets
, physical_reads
, physical_writes
select l_snap_id
, p_dbid
, p_instance_number
, id
, name
, block_size
, set_msize
, cnum_repl
, cnum_write
, cnum_set
, buf_got
, sum_write
, sum_scan
, free_buffer_wait
, write_complete_wait
, buffer_busy_wait
, free_buffer_inspected
, dirty_buffers_inspected
, db_block_change
, db_block_gets
, consistent_gets
, physical_reads
, physical_writes
from v$buffer_pool_statistics;
insert into stats$rollstat
( snap_id
, dbid
, instance_number
, usn
, extents
, rssize
, writes
, xacts
, gets
, waits
, optsize
, hwmsize
, shrinks
, wraps
, extends
, aveshrink
, aveactive
select l_snap_id
, p_dbid
, p_instance_number
, usn
, extents
, rssize
, writes
, xacts
, gets
, waits
, optsize
, hwmsize
, shrinks
, wraps
, extends
, aveshrink
, aveactive
from v$rollstat;
insert into stats$rowcache_summary
( snap_id
, dbid
, instance_number
, parameter
, total_usage
, usage
, gets
, getmisses
, scans
, scanmisses
, scancompletes
, modifications
, flushes
, dlm_requests
, dlm_conflicts
, dlm_releases
select l_snap_id
, p_dbid
, p_instance_number
, parameter
, sum("COUNT")
, sum(usage)
, sum(gets)
, sum(getmisses)
, sum(scans)
, sum(scanmisses)
, sum(scancompletes)
, sum(modifications)
, sum(flushes)
, sum(dlm_requests)
, sum(dlm_conflicts)
, sum(dlm_releases)
from v$rowcache
group by l_snap_id, p_dbid, p_instance_number, parameter;
/* Collect parameters every snapshot, to cater for dynamic
parameters changable while instance is running
if l_all_init = 'FALSE' then
insert into stats$parameter
( snap_id
, dbid
, instance_number
, name
, value
, isdefault
, ismodified
select l_snap_id
, p_dbid
, p_instance_number
, name
, value
, isdefault
, ismodified
from v$system_parameter;
else
insert into stats$parameter
( snap_id
, dbid
, instance_number
, name
, value
, isdefault
, ismodified
select l_snap_id
, p_dbid
, p_instance_number
, i.ksppinm
, sv.ksppstvl
, sv.ksppstdf
, decode(bitand(sv.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')
from stats$x$ksppi i
, stats$x$ksppsv sv
where i.indx = sv.indx;
end if;
/* To cater for variable size SGA - insert on each snapshot */
insert into stats$sga
( snap_id
, dbid
, instance_number
, name
, value
select l_snap_id
, p_dbid
, p_instance_number
, name
, value
from v$sga;
/* Get current allocation of memory in the SGA */
insert into stats$sgastat
( snap_id
, dbid
, instance_number
, pool
, name
, bytes
select l_snap_id
, p_dbid
, p_instance_number
, pool
, name
, bytes
from v$sgastat;
insert into stats$system_event
( snap_id
, dbid
, instance_number
, event
, total_waits
, total_timeouts
, time_waited_micro
select l_snap_id
, p_dbid
, p_instance_number
, event
, total_waits
, total_timeouts
, time_waited_micro
from v$system_event;
insert into stats$bg_event_summary
( snap_id
, dbid
, instance_number
, event
, total_waits
, total_timeouts
, time_waited_micro
select l_snap_id
, p_dbid
, p_instance_number
, e.event
, sum(e.total_waits)
, sum(e.total_timeouts)
, sum(e.time_waited_micro)
from v$session_event e
where e.sid in (select s.sid from v$session s where s.type = 'BACKGROUND')
group by l_snap_id, p_dbid, p_instance_number, e.event;
insert into stats$sysstat
( snap_id
, dbid
, instance_number
, statistic#
, name
, value
select l_snap_id
, p_dbid
, p_instance_number
, statistic#
, name
, value
from v$sysstat;
insert into stats$waitstat
( snap_id
, dbid
, instance_number
, class
, wait_count
, time
select l_snap_id
, p_dbid
, p_instance_number
, class
, "COUNT"
, time
from v$waitstat;
insert into stats$enqueue_stat
( snap_id
, dbid
, instance_number
, eq_type
, total_req#
, total_wait#
, succ_req#
, failed_req#
, cum_wait_time
select l_snap_id
, p_dbid
, p_instance_number
, eq_type
, total_req#
, total_wait#
, succ_req#
, failed_req#
, cum_wait_time
from v$enqueue_stat
where total_req# != 0;
insert into stats$latch
( snap_id
, dbid
, instance_number
, name
, latch#
, level#
, gets
, misses
, sleeps
, immediate_gets
, immediate_misses
, spin_gets
, sleep1
, sleep2
, sleep3
, sleep4
, wait_time
select l_snap_id
, p_dbid
, p_instance_number
, name
, latch#
, level#
, gets
, misses
, sleeps
, immediate_gets
, immediate_misses
, spin_gets
, sleep1
, sleep2
, sleep3
, sleep4
, wait_time
from v$latch;
insert into stats$latch_misses_summary
( snap_id
, dbid
, instance_number
, parent_name
, where_in_code
, nwfail_count
, sleep_count
, wtr_slp_count
select l_snap_id
, p_dbid
, p_instance_number
, parent_name
, "WHERE"
, sum(nwfail_count)
, sum(sleep_count)
, sum(wtr_slp_count)
from v$latch_misses
where sleep_count > 0
group by l_snap_id, p_dbid, p_instance_number
, parent_name, "WHERE";
insert into stats$resource_limit
( snap_id
, dbid
, instance_number
, resource_name
, current_utilization
, max_utilization
, initial_allocation
, limit_value
select l_snap_id
, p_dbid
, p_instance_number
, resource_name
, current_utilization
, max_utilization
, initial_allocation
, limit_value
from v$resource_limit
where limit_value != ' UNLIMITED'
and max_utilization > 0;
insert into stats$undostat
( begin_time
, end_time
, dbid
, instance_number
, snap_id
, undotsn
, undoblks
, txncount
, maxquerylen
, maxconcurrency
, unxpstealcnt
, unxpblkrelcnt
, unxpblkreucnt
, expstealcnt
, expblkrelcnt
, expblkreucnt
, ssolderrcnt
, nospaceerrcnt
select begin_time
, end_time
, p_dbid
, p_instance_number
, l_snap_id
, undotsn
, undoblks
, txncount
, maxquerylen
, maxconcurrency
, unxpstealcnt
, unxpblkrelcnt
, unxpblkreucnt
, expstealcnt
, expblkrelcnt
, expblkreucnt
, ssolderrcnt
, nospaceerrcnt
from v$undostat
where begin_time > l_max_begin_time
and begin_time + (1/(24*6)) <= end_time;
insert into stats$db_cache_advice
( snap_id
, dbid
, instance_number
, id
, name
, block_size
, buffers_for_estimate
, advice_status
, size_for_estimate
, estd_physical_read_factor
, estd_physical_reads
select l_snap_id
, p_dbid
, p_instance_number
, id
, name
, block_size
, buffers_for_estimate
, advice_status
, size_for_estimate
, estd_physical_read_factor
, estd_physical_reads
from v$db_cache_advice
where advice_status = 'ON';
insert into stats$pgastat
( snap_id
, dbid
, instance_number
, name
, value
select l_snap_id
, p_dbid
, p_instance_number
, name
, value
from v$pgastat;
insert into stats$instance_recovery
( snap_id
, dbid
, instance_number
, recovery_estimated_ios
, actual_redo_blks
, target_redo_blks
, log_file_size_redo_blks
, log_chkpt_timeout_redo_blks
, log_chkpt_interval_redo_blks
, fast_start_io_target_redo_blks
, target_mttr
, estimated_mttr
, ckpt_block_writes
select l_snap_id
, p_dbid
, p_instance_number
, recovery_estimated_ios
, actual_redo_blks
, target_redo_blks
, log_file_size_redo_blks
, log_chkpt_timeout_redo_blks
, log_chkpt_interval_redo_blks
, fast_start_io_target_redo_blks
, target_mttr
, estimated_mttr
, ckpt_block_writes
from v$instance_recovery;
if p_parallel = 'YES' then
insert into stats$dlm_misc
( snap_id
, dbid
, instance_number
, statistic#
, name
, value
select l_snap_id
, p_dbid
, p_instance_number
, statistic#
, name
, value
from v$dlm_misc;
end if; /* parallel */
/* Begin gathering Extended Statistics */
IF l_snap_level >= 5 THEN
snap_sql;
END IF; /* snap level >=5 */
IF l_snap_level >= 10 THEN
insert into stats$latch_children
( snap_id
, dbid
, instance_number
, latch#
, child#
, gets
, misses
, sleeps
, immediate_gets
, immediate_misses
, spin_gets
, sleep1
, sleep2
, sleep3
, sleep4
, wait_time
select l_snap_id
, p_dbid
, p_instance_number
, latch#
, child#
, gets
, misses
, sleeps
, immediate_gets
, immediate_misses
, spin_gets
, sleep1
, sleep2
, sleep3
, sleep4
, wait_time
from v$latch_children;
insert into stats$latch_parent
( snap_id
, dbid
, instance_number
, latch#
, level#
, gets
, misses
, sleeps
, immediate_gets
, immediate_misses
, spin_gets
, sleep1
, sleep2
, sleep3
, sleep4
, wait_time
select l_snap_id
, p_dbid
, p_instance_number
, latch#
, level#
, gets
, misses
, sleeps
, immediate_gets
, immediate_misses
, spin_gets
, sleep1
, sleep2
, sleep3
, sleep4
, wait_time
from v$latch_parent;
END IF; /* snap level >=10 */
/* Record level session-granular statistics if a specific session
has been requested
if l_session_id > 0
then
insert into stats$sesstat
( snap_id
, dbid
, instance_number
, statistic#
, value
select l_snap_id
, p_dbid
, p_instance_number
, statistic#
, value
from v$sesstat
where sid = l_session_id;
insert into stats$session_event
( snap_id
, dbid
, instance_number
, event
, total_waits
, total_timeouts
, time_waited_micro
, max_wait
select l_snap_id
, p_dbid
, p_instance_number
, event
, total_waits
, total_timeouts
, time_waited_micro
, max_wait
from v$session_event
where sid = l_session_id;
end if;
commit work;
RETURN l_snap_id;
end SNAP; /* Function SNAP */
begin /* STATSPACK body */
/* Query the database id, instance_number, database name, instance
name and startup time for the instance we are working on
/* Get information about the current instance */
open get_instance;
fetch get_instance into
p_instance_number, p_instance_name
, p_startup_time, p_parallel, p_version
, p_host_name;
close get_instance;
/* Select the database info for the db connected to */
open get_db;
fetch get_db into p_dbid, p_name;
close get_db;
/* Keep the package
sys.dbms_shared_pool.keep('PERFSTAT.STATSPACK', 'P');
/* Determine if the instance has been restarted since the previous snapshot
begin
select 1
into p_new_sga
from stats$database_instance
where startup_time = p_startup_time
and dbid = p_dbid
and instance_number = p_instance_number;
exception
when NO_DATA_FOUND then
p_new_sga := 0;
end;
end STATSPACK;
Warning: Package Body created with compilation errors.
SQL> show error
Errors for PACKAGE BODY STATSPACK:
LINE/COL ERROR
2045/3 PLS-00201: identifier 'SYS.DBMS_SHARED_POOL' must be declared
2045/3 PL/SQL: Statement ignoredWhen i compiled the package, it compiled with following error.
Warning: Package Body created with compilation errors.
SQL> show error
Errors for PACKAGE BODY STATSPACK:
LINE/COL ERROR
2045/3 PLS-00201: identifier 'SYS.DBMS_SHARED_POOL' must be declared
2045/3 PL/SQL: Statement ignored
SQL> -
How to interprete Statspack report
Hello all,
I'm new in using statspack and i've tried to run it and gather the report but i can't interprete the result, i mean what can i do, the decisions after reading the report how to inteprete, what part of the result are the essential.
Here is an extract of my statspack report. If someone can help me or any documentations online for this.
STATSPACK report for
DB Name DB Id Instance Inst Num Release OPS Host
QLM3 1443332160 orcl 1 8.1.7.0.0 NO SRVUSINE
Snap Id Snap Time Sessions
Begin Snap: 1 03-Jan-07 15:48:53 57
End Snap: 2 03-Jan-07 15:56:30 57
Elapsed: 7.62 (mins)
Cache Sizes
~~~~~~~~~~~
db_block_buffers: 19200 log_buffer: 163840
db_block_size: 8192 shared_pool_size: 128000000
Load Profile
~~~~~~~~~~~~ Per Second Per Transaction
Redo size: 8,232.78 22,941.34
Logical reads: 11,853.51 33,030.82
Block changes: 41.60 115.91
Physical reads: 145.94 406.67
Physical writes: 36.83 102.62
User calls: 139.75 389.42
Parses: 6.30 17.55
Hard parses: 0.09 0.25
Sorts: 2.23 6.23
Logons: 0.82 2.29
Executes: 87.97 245.13
Transactions: 0.36
% Blocks changed per Read: 0.35 Recursive Call %: 32.96
Rollback per transaction %: 6.71 Rows per Sort: 104.37
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 99.90
Buffer Hit %: 98.77 In-memory Sort %: 99.22
Library Hit %: 99.83 Soft Parse %: 98.58
Execute to Parse %: 92.84 Latch Hit %: 100.00
Parse CPU to Parse Elapsd %: 57.07 % Non-Parse CPU: 100.00
Shared Pool Statistics Begin End
Memory Usage %: 88.80 88.08
% SQL with executions>1: 35.12 35.45
% Memory for SQL w/exec>1: 56.60 58.45
Top 5 Wait Events
~~~~~~~~~~~~~~~~~ Wait % Total
Event Waits Time (cs) Wt Time
direct path write 13,024 13,301 38.64
db file sequential read 17,592 8,103 23.54
direct path read 13,514 7,199 20.91
db file scattered read 3,231 2,085 6.06
PX Deq: Txn Recovery Start 8 699 2.03
Wait Events for DB: QLM3 Instance: orcl Snaps: 1 -2
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (cs) (ms) /txn
direct path write 13,024 0 13,301 10 79.4
db file sequential read 17,592 0 8,103 5 107.3
direct path read 13,514 0 7,199 5 82.4
db file scattered read 3,231 0 2,085 6 19.7
PX Deq: Txn Recovery Start 8 3 699 874 0.0
db file parallel write 82 0 656 80 0.5
log file parallel write 348 0 471 14 2.1
control file parallel write 214 0 447 21 1.3
log file sync 256 0 309 12 1.6
control file sequential read 229 0 209 9 1.4
log file switch completion 10 0 205 205 0.1
Wait for stopper event to be 19 17 200 105 0.1
SQL*Net break/reset to clien 74 0 191 26 0.5
file open 1,587 0 122 1 9.7
log buffer space 16 0 115 72 0.1
buffer busy waits 11 0 36 33 0.1
SQL*Net more data to client 3,459 0 35 0 21.1
latch free 68 52 18 3 0.4
file identify 8 0 8 10 0.0
refresh controlfile command 10 0 6 6 0.1
log file sequential read 4 0 4 10 0.0
log file single write 8 0 3 4 0.0
LGWR wait for redo copy 1 0 2 20 0.0
PX Deq: Signal ACK 3 0 1 3 0.0
PX Deq: Join ACK 5 0 0 0 0.0
enqueue 5 0 0 0 0.0
SQL*Net message from client 62,888 0 1,462,717 233 383.5
PX Idle Wait 602 600 124,058 2061 3.7
virtual circuit status 15 15 46,101 30734 0.1
SQL*Net message to client 62,885 0 10 0 383.4
SQL*Net more data from clien 12 0 1 1 0.1
Background Wait Events for DB: QLM3 Instance: orcl Snaps: 1 -2
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (cs) (ms) /txn
db file parallel write 82 0 656 80 0.5
direct path read 542 0 546 10 3.3
log file parallel write 348 0 471 14 2.1
control file parallel write 214 0 447 21 1.3
Wait for stopper event to be 19 17 200 105 0.1
control file sequential read 176 0 194 11 1.1
file open 1,485 0 50 0 9.1
buffer busy waits 1 0 33 330 0.0
db file scattered read 7 0 16 23 0.0
direct path write 297 0 8 0 1.8
file identify 8 0 8 10 0.0
log file sequential read 4 0 4 10 0.0
log file single write 8 0 3 4 0.0
LGWR wait for redo copy 1 0 2 20 0.0
PX Deq: Signal ACK 3 0 1 3 0.0
db file sequential read 1 0 1 10 0.0
PX Deq: Join ACK 5 0 0 0 0.0
enqueue 1 0 0 0 0.0
rdbms ipc message 1,221 427 134,286 1100 7.4
pmon timer 149 148 45,558 3058 0.9
smon timer 2 1 43,807 ###### 0.0
SQL ordered by Gets for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code. As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
Buffer Gets Executions Gets per Exec % Total Hash Value
887,405 3,544 250.4 16.4 8985785
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE > 0 AND GISEMENT_T
YPE IN ( 'L','F' ) AND MVT_SITE_CODE = :b5
887,405 3,544 250.4 16.4 739720993
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE != 'T' AND MVT_SITE_CODE = :b5
885,540 3,531 250.8 16.3 203835771
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE < 0 AND GISEMENT_T
YPE IN ( 'L','F' ) AND MVT_SITE_CODE = :b5
885,540 3,531 250.8 16.3 3827568942
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE > 0 AND GISEMENT_T
YPE IN ( 'T' ) AND GISEMENT_SITE_CODE = :b5
885,410 3,544 249.8 16.3 667813037
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE < 0 AND GISEMENT_T
YPE IN ( 'T' ) AND GISEMENT_SITE_CODE = :b5
472,580 1 472,580.0 8.7 1418790643
SELECT COUNT(*) FROM VAPS_APS_SORTIES WHERE MVT_DATE LIKE '%' AN
D INVEST_NUMERO IS NULL and (CLE=:1)
180,137 1 180,137.0 3.3 1562147089
SELECT COUNT(*) FROM VPRF_PRF_ETAT_STOCKS
110,321 443 249.0 2.0 2233067473
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4
72,956 2 36,478.0 1.3 3376831664
BEGIN statspack.snap; END;
67,904 1 67,904.0 1.3 625421128
INSERT INTO STATS$SQLTEXT ( HASH_VALUE,TEXT_SUBSET,PIECE,SQL_TEX
T,ADDRESS,COMMAND_TYPE,LAST_SNAP_ID ) SELECT ST1.HASH_VALUE,SS.
TEXT_SUBSET,ST1.PIECE,ST1.SQL_TEXT,ST1.ADDRESS,ST1.COMMAND_TYPE,
SS.SNAP_ID FROM V$SQLTEXT ST1,STATS$SQL_SUMMARY SS WHERE SS.S
NAP_ID = :b1 AND SS.DBID = :b2 AND SS.INSTANCE_NUMBER = :b3 A
SQL ordered by Gets for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code. As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
Buffer Gets Executions Gets per Exec % Total Hash Value
49,930 9,986 5.0 0.9 2352601327
SELECT INSTR(:b1,'/') FROM DUAL
26,262 1 26,262.0 0.5 2467990648
SELECT PRF_CB_QUALITES.QUALITE_LIB, PRF_FICHEARTICLES.FSA_
ARTICLE_CODE, PRF_CB_EMBALLAGES.EMB_LIBELLE, PRF_CB_CALIBR
ES.CALIBRE_LIBELLE, PRF_CB_VARIETES.VARIETE_LIB, PRF_CF_ST
OCKS.CF_CODE, PRF_CF_CHAMBREFROIDES.CF_LIBELLE, to_char(PR
F_CF_STOCKS.MC_DATE_CONGELATION,'ddd') ||PRF_CF_STOCKS.MC_EQUIPE
25,024 1 25,024.0 0.5 2687416176
SELECT num_lot_cqi num_lot, date_congelation date_peche, equipe_
congelation equipe_conditionnement, equipe_emballage FROM VCQI_P
RF_CB_LOTS WHERE site_code = fcqi_parametre ('SITE_CODE', 0) AND
quart_code like nvl(:1,'%') order by date_congelation desc
24,952 1 24,952.0 0.5 2144314401
SELECT DATE_CONGELATION,EQUIPE_CONGELATION,EQUIPE_EMBALLAGE FR
OM VCQI_PRF_CB_LOTS WHERE NUM_LOT_CQI = :b1 AND QUART_CODE LIK
E NVL(:b2,'%')
21,644 3,542 6.1 0.4 3246828773
SELECT SUM(NVL(ARTSTATGIS_QTE,0)) FROM APS_MVT_ARTICLE_GISEMEN
T WHERE ARTICLE_ID = :b1 AND STATUT_CODE = :b2 AND REGIME = :
b3 AND SITE_CODE = :b4
6,714 3 2,238.0 0.1 1676564828
SELECT ROWID,CLE,PBS_DATE,PBS_HEURE,IMPUTATION_CODE,SERVICE_CODE
,STATUT_CODE,REGIME,PBS_BONTRAVAIL,INVEST_NUMERO,UTIL_NUMERO_EME
TTEUR,DDESORTIE_NUM_DDE,PBS_VALEUR,REFACTURER,REFACTURER_CODE,UT
IL_NUMERO_DESTINATAIRE,OBSERVATION,IMPRIME_UNEFOIS,PBS_VALIDE,DA
TE_VALIDATION,PBS_ENVOYE_MAGASIN,DATE_ENVOIMAG,PBS_GISEMENT_VALI
6,714 3 2,238.0 0.1 2431929513
SELECT COUNT(*) FROM APS_SORTIES_HDR WHERE (PBS_VALIDE='O') AND
(PBS_ENVOYE_MAGASIN='O' )AND (PBS_GISEMENT_VALIDE='N')
6,022 60 100.4 0.1 1010618514
SELECT COUNT(*) FROM QRH_PNT_MOUVEMENTS WHERE STE_CODE = :1 AND
(ANOMALIE!='0') AND (ANOMALIE!='1') AND (ANOMALIE!='2') AND (ANO
MALIE!='3') AND (ANOMALIE!='21') AND (VALIDEE='N') AND (JOURNEE=
TO_CHAR(:2,'dd/mm/yyyy')) AND (MATRICULE=:3) AND (SERVICE_CODE=:
4) and (MATRICULE=:5) and (STE_CODE=:6)
6,022 60 100.4 0.1 4067308175
SELECT ROWID,VALIDEE,MATRICULE,ENTREE,SORTIE,REGUL,ORIGINE_POINT
AGE,JUSTIFICATION_CODE,JUSTIFIEE,ANOMALIE,JOURNEE,SERVICE_CODE,S
TE_CODE,UTIL_NUMERO_JUSTIFIER,UTIL_NUMERO_VALIDER,OK_PAIE,DATE_O
K_PAIE FROM QRH_PNT_MOUVEMENTS WHERE STE_CODE = :1 AND (ANOMALIE
!='0') AND (ANOMALIE!='1') AND (ANOMALIE!='2') AND (ANOMALIE!='3
SQL ordered by Gets for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code. As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
Buffer Gets Executions Gets per Exec % Total Hash Value
SQL ordered by Reads for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Disk Reads Threshold: 1000
Physical Reads Executions Reads per Exec % Total Hash Value
16,941 1 16,941.0 25.4 1418790643
SELECT COUNT(*) FROM VAPS_APS_SORTIES WHERE MVT_DATE LIKE '%' AN
D INVEST_NUMERO IS NULL and (CLE=:1)
12,263 443 27.7 18.4 2233067473
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4
6,699 3 2,233.0 10.0 2431929513
SELECT COUNT(*) FROM APS_SORTIES_HDR WHERE (PBS_VALIDE='O') AND
(PBS_ENVOYE_MAGASIN='O' )AND (PBS_GISEMENT_VALIDE='N')
6,493 3 2,164.3 9.7 1676564828
SELECT ROWID,CLE,PBS_DATE,PBS_HEURE,IMPUTATION_CODE,SERVICE_CODE
,STATUT_CODE,REGIME,PBS_BONTRAVAIL,INVEST_NUMERO,UTIL_NUMERO_EME
TTEUR,DDESORTIE_NUM_DDE,PBS_VALEUR,REFACTURER,REFACTURER_CODE,UT
IL_NUMERO_DESTINATAIRE,OBSERVATION,IMPRIME_UNEFOIS,PBS_VALIDE,DA
TE_VALIDATION,PBS_ENVOYE_MAGASIN,DATE_ENVOIMAG,PBS_GISEMENT_VALI
4,783 2 2,391.5 7.2 3376831664
BEGIN statspack.snap; END;
4,075 1 4,075.0 6.1 1762397322
SELECT ROWID,MC_CODE,CB_QUALITE,CB_EMBALLAGE,CB_CALIBRE,CB_VARIE
TE,TYPECH_CODE,TYPECH_LIBELLE,CF_CODE,CF_LIBELLE,MC_EQUIPE_CONDI
TIONNEMENT,MC_DATE_CONGELATION,MC_EQUIPE_EMBALLAGE,MC_DATE_EMBAL
LAGE,INC_CODE,INC_LIBELLE,PALETTE_CODE,TP_CODE,CB_ORIGINE_CODE,U
SINE_CODE,LIEU_CODE,MC_ETAT,TP_LIBELLE,ORIGINE_LIBELLE,QUALITE_L
3,455 1 3,455.0 5.2 2467990648
SELECT PRF_CB_QUALITES.QUALITE_LIB, PRF_FICHEARTICLES.FSA_
ARTICLE_CODE, PRF_CB_EMBALLAGES.EMB_LIBELLE, PRF_CB_CALIBR
ES.CALIBRE_LIBELLE, PRF_CB_VARIETES.VARIETE_LIB, PRF_CF_ST
OCKS.CF_CODE, PRF_CF_CHAMBREFROIDES.CF_LIBELLE, to_char(PR
F_CF_STOCKS.MC_DATE_CONGELATION,'ddd') ||PRF_CF_STOCKS.MC_EQUIPE
2,308 1 2,308.0 3.5 3874720143
INSERT INTO STATS$SQL_SUMMARY ( SNAP_ID,DBID,INSTANCE_NUMBER,TEX
T_SUBSET,SHARABLE_MEM,SORTS,MODULE,LOADED_VERSIONS,EXECUTIONS,LO
ADS,INVALIDATIONS,PARSE_CALLS,DISK_READS,BUFFER_GETS,ROWS_PROCES
SED,ADDRESS,HASH_VALUE,VERSION_COUNT ) SELECT :b1,:b2,:b3,SUBST
R(SQL_TEXT,1,31),SHARABLE_MEM,SORTS,MODULE,LOADED_VERSIONS,EXECU
2,295 1 2,295.0 3.4 3337740287
INSERT INTO STATS$SQL_STATISTICS ( SNAP_ID,DBID,INSTANCE_NUMBER,
TOTAL_SQL,TOTAL_SQL_MEM,SINGLE_USE_SQL,SINGLE_USE_SQL_MEM ) SEL
ECT :b1,:b2,:b3,COUNT(1),SUM(SHARABLE_MEM),SUM(DECODE(EXECUTIONS
,1,1,0)),SUM(DECODE(EXECUTIONS,1,SHARABLE_MEM,0)) FROM V$SQLXS
2,232 14 159.4 3.3 2819681083
SELECT COUNT(*) FROM APS_SORTIES_HDR WHERE PBS_GISEMENT_VALIDE =
'N' and (SERVICE_CODE=:1) and (PBS_VALIDE=:2)
SQL ordered by Reads for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Disk Reads Threshold: 1000
Physical Reads Executions Reads per Exec % Total Hash Value
2,232 14 159.4 3.3 2856670560
SELECT ROWID,CLE,IMPUTATION_CODE,SERVICE_CODE,STATUT_CODE,REGIME
,INVEST_NUMERO,PBS_BONTRAVAIL,REFACTURER,REFACTURER_CODE,ENTREE_
NUMERO,PBS_DATE,PBS_HEURE,UTIL_NUMERO_EMETTEUR,UTIL_NUMERO_DESTI
NATAIRE,OBSERVATION,PBS_VALIDE,DATE_VALIDATION,PBS_ENVOYE_MAGASI
N,DATE_ENVOIMAG,DDESORTIE_NUM_DDE,PBS_VALEUR,IMPRIME_UNEFOIS,PBS
1,168 1 1,168.0 1.8 1352033258
SELECT PRF_CB_QUALITES.QUALITE_LIB, PRF_FICHEARTICLES.FSA_
ARTICLE_CODE, PRF_CB_EMBALLAGES.EMB_LIBELLE, PRF_CB_CALIBR
ES.CALIBRE_LIBELLE, PRF_CB_VARIETES.VARIETE_LIB, PRF_CF_ST
OCKS.CF_CODE, PRF_CF_CHAMBREFROIDES.CF_LIBELLE, to_char(PR
F_CF_STOCKS.MC_DATE_CONGELATION,'ddd') ||PRF_CF_STOCKS.MC_EQUIPE
723 3 241.0 1.1 165227727
SELECT ROWID,CLE,UTIL_NUMERO_VALIDE,VALIDPBS_DATE,VALIDPBS_HEURE
FROM APS_SORTIES_VALIDATION WHERE (CLE=:1)
685 3 228.3 1.0 3538988510
SELECT COUNT(*) FROM APS_SORTIES_VALIDATION WHERE (CLE=:1)
602 1 602.0 0.9 1562147089
SELECT COUNT(*) FROM VPRF_PRF_ETAT_STOCKS
390 15 26.0 0.6 3423685253
INSERT INTO PRF_CF_ENTREES ( MC_CODE,CF_CODE,PALETTE_CODE,MC_ETA
T,SYS_DATE_LECTEUR,TYPE_ENTREE ) VALUES ( :b1,:b2,:b3,SUBSTR(:b
4,1,2),SYSDATE,'E' )
372 6 62.0 0.6 2944582360
SELECT COUNT(*) FROM QRH_FIP_AGENTS WHERE (QRH_FIP_AGENTS.AGE
NT_MATRICULE = :b1 ) AND (QRH_FIP_AGENTS.SERVICE_CODE LIKE :b2
) AND (QRH_FIP_AGENTS.SERVICE_CODE IN (SELECT SERVICE_CODE FRO
M SEC_QRH_ACCES_SERVICES WHERE STE_CODE = :b3 AND (ACCES_FICHE
PERSONNEL = 'O' AND POINTAGECONSULTATION = 'O' AND POINTAGE_
352 15 23.5 0.5 836774746
INSERT INTO PRF_CF_STOCKS ( MC_CODE,TP_CODE,CB_ORIGINE_CODE,USIN
E_CODE,LIEU_CODE,CB_QUALITE,CB_EMBALLAGE,MARQUE_LIBELLE,CB_CALIB
RE,CB_VARIETE,TYPECH_CODE,MC_DATE_CONGELATION,MC_EQUIPE_CONDITIO
NNEMENT,MC_DATE_EMBALLAGE,MC_EQUIPE_EMBALLAGE,PALETTE_CODE,CF_CO
DE,FSA_ARTICLE_CODE,MC_POIDS_KG,MC_ETAT,INC_CODE,BASSIN_CODE,MAR
271 15 18.1 0.4 1991901539
SELECT COUNT('X') FROM DUAL WHERE EXISTS (SELECT 'X' FROM
PRF_LOTS_ENTREES WHERE NUMERO_LOT = :b1 AND TP_CODE = :b2 AND
SQL ordered by Executions for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Executions Threshold: 100
Executions Rows Processed Rows per Exec Hash Value
9,986 9,986 1.0 2352601327
SELECT INSTR(:b1,'/') FROM DUAL
3,544 3,544 1.0 8985785
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE > 0 AND GISEMENT_T
YPE IN ( 'L','F' ) AND MVT_SITE_CODE = :b5
3,544 3,544 1.0 667813037
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE < 0 AND GISEMENT_T
YPE IN ( 'T' ) AND GISEMENT_SITE_CODE = :b5
3,544 3,544 1.0 739720993
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE != 'T' AND MVT_SITE_CODE = :b5
3,542 3,542 1.0 3246828773
SELECT SUM(NVL(ARTSTATGIS_QTE,0)) FROM APS_MVT_ARTICLE_GISEMEN
T WHERE ARTICLE_ID = :b1 AND STATUT_CODE = :b2 AND REGIME = :
b3 AND SITE_CODE = :b4
3,531 3,531 1.0 203835771
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE < 0 AND GISEMENT_T
YPE IN ( 'L','F' ) AND MVT_SITE_CODE = :b5
3,531 3,531 1.0 3827568942
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4 AND MVT_TYPE = 'T' AND MVT_QUANTITE > 0 AND GISEMENT_T
YPE IN ( 'T' ) AND GISEMENT_SITE_CODE = :b5
629 629 1.0 3347504826
SELECT COUNT('x') FROM DUAL WHERE EXISTS (SELECT 'x' FROM
PRF_TB_AI WHERE CODE_AI = :b1 )
586 586 1.0 830918687
SELECT SYSDATE FROM DUAL
494 494 1.0 2353080377
INSERT INTO APS_ARCHIVE_STOCKS_DTL VALUES ( :b1,:b2,:b3,:b4,:b5,
:b6 )
444 444 1.0 431034241
UPDATE APS_ARCHIVE_STOCKS SET ART_STAT_QTE_STOCK_SITE=:b1 WHERE
PERIODE = :b2 AND ARTICLE_ID = :b3 AND STATUT_CODE = :b4 AND
REGIME = :b5
443 443 1.0 2233067473
SELECT SUM(MVT_QUANTITE) FROM APS_MVT_MOUVEMENTS WHERE PERIOD
SQL ordered by Executions for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Executions Threshold: 100
Executions Rows Processed Rows per Exec Hash Value
E > :b1 AND ARTICLE_ID = :b2 AND STATUT_CODE = :b3 AND REGIME
= :b4
442 442 1.0 4030231140
INSERT INTO APS_ARCHIVE_STOCKS ( PERIODE,ARTICLE_ID,STATUT_CODE,
REGIME,ART_STAT_QTE_STOCK,ART_STAT_QTE_STOCK_SITE,ART_STAT_PUMP,
ART_STAT_PUMP_EURO,ART_STAT_PUMP_1 ) VALUES ( :b1,:b2,:b3,:b4,:
b5,:b6,:b7,:b8, NULL )
441 3,520 8.0 2193642303
SELECT SITE_CODE FROM APS_LOC_SITES
416 167 0.4 3549129673
SELECT DISTINCT LIBELLE_PRODUIT FROM VCQI_PRF_CB_QC_PRODUITS
WHERE TYPE_PRODUIT = :b1
415 415 1.0 3105143149
SELECT UTIL_NOM || DECODE(UTIL_PRENOM, NULL , NULL ,' ' || UTIL_
PRENOM ) UTIL_NOM_PRENOM FROM COM_UTILISATEURS WHERE UTIL_NU
MERO = :b1
270 270 1.0 1045955060
SELECT COUNT('X') FROM DUAL WHERE EXISTS (SELECT 'X' FROM
PRF_GFR_BASSINS WHERE BASSIN_CODE = :b1 )
235 235 1.0 2123798088
SELECT COUNT('X') FROM DUAL WHERE EXISTS (SELECT 'X' FROM
PRF_FICHEARTICLES WHERE FSA_ARTICLE_CODE = :b1 )
218 217 1.0 2987457698
SELECT NOM FROM SYS_CQI_SITE WHERE CODE = :b1
213 213 1.0 1425443843
update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,
order$=:6,cache=:7,highwater=:8,audit$=:9 where obj#=:1
183 183 1.0 3529593353
SELECT COUNT('X') FROM DUAL WHERE EXISTS (SELECT 'X' FROM
PRF_GFR_BASSINS WHERE BASSIN_CODE = SUBSTR(:b1,2,3) )
178 0 0.0 313510536
select job from sys.job$ where next_date < sysdate and (field1
= :1 or (field1 = 0 and 'Y' = :2)) order by next_date, job
167 167 1.0 2542007726
SELECT PRF_PARAM_VALEUR FROM PRF_MAHAVOKATRA_PARAMETRES WHERE
PRF_PARAM_NOM = :b1
144 144 1.0 1202015936
SELECT CODE_AI,DESCRIPTION_AI,TYPE_AI,LONGUEUR_MAX FROM PRF_TB
AI WHERE CODEAI = :b1
138 138 1.0 2840696239
SELECT SEQ_PRF_MC_SERIE.Nextval FROM Dual
SQL ordered by Executions for DB: QLM3 Instance: orcl Snaps: 1 -2
-> End Executions Threshold: 100
Executions Rows Processed Rows per Exec Hash Value
101 7 0.1 148923490
SELECT COUNT(*) FROM APS_SORTIES_HDR WHERE (PBS_VALIDE='O') AND
(PBS_ENVOYE_MAGASIN='O' )AND (PBS_GISEMENT_VALIDE='N') and (CLE=
:1)
101 7 0.1 2329028825
SELECT ROWID,CLE,PBS_DATE,PBS_HEURE,IMPUTATION_CODE,SERVICE_CODE
Instance Activity Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
Statistic Total per Second per Trans
background checkpoints completed 4 0.0 0.0
background checkpoints started 4 0.0 0.0
background timeouts 620 1.4 3.8
branch node splits 0 0.0 0.0
buffer is not pinned count 4,838,419 10,587.4 29,502.6
buffer is pinned count 15,660,264 34,267.5 95,489.4
bytes received via SQL*Net from c 7,127,276 15,595.8 43,459.0
bytes sent via SQL*Net to client 13,724,270 30,031.2 83,684.6
calls to get snapshot scn: kcmgss 41,025 89.8 250.2
calls to kcmgas 383 0.8 2.3
calls to kcmgcs 145 0.3 0.9
change write time 134 0.3 0.8
cleanouts and rollbacks - consist 0 0.0 0.0
cleanouts only - consistent read 3 0.0 0.0
cluster key scan block gets 132 0.3 0.8
cluster key scans 64 0.1 0.4
commit cleanout failures: block l 2 0.0 0.0
commit cleanout failures: buffer 0 0.0 0.0
commit cleanout failures: callbac 3 0.0 0.0
commit cleanout failures: cannot 0 0.0 0.0
commit cleanouts 1,238 2.7 7.6
commit cleanouts successfully com 1,233 2.7 7.5
consistent changes 37 0.1 0.2
consistent gets 5,342,340 11,690.0 32,575.2
CPU used by this session 563,606,920 1,233,275.5 3,436,627.6
CPU used when call started 16,475 36.1 100.5
CR blocks created 32 0.1 0.2
current blocks converted for CR
cursor authentications 0 0.0 0.0
data blocks consistent reads - un 37 0.1 0.2
db block changes 19,010 41.6 115.9
db block gets 74,714 163.5 455.6
DBWR buffers scanned 11,292 24.7 68.9
DBWR checkpoint buffers written 604 1.3 3.7
DBWR checkpoints 4 0.0 0.0
DBWR free buffers found 10,956 24.0 66.8
DBWR lru scans 48 0.1 0.3
DBWR make free requests 48 0.1 0.3
DBWR summed scan depth 11,292 24.7 68.9
DBWR transaction table writes 31 0.1 0.2
DBWR undo block writes 223 0.5 1.4
deferred (CURRENT) block cleanout 796 1.7 4.9
DFO trees parallelized 0 0.0 0.0
dirty buffers inspected 41 0.1 0.3
enqueue conversions 59 0.1 0.4
enqueue releases 1,608 3.5 9.8
enqueue requests 1,627 3.6 9.9
enqueue timeouts 21 0.1 0.1
enqueue waits 0 0.0 0.0
execute count 40,202 88.0 245.1
free buffer inspected 43 0.1 0.3
free buffer requested 50,071 109.6 305.3
hot buffers moved to head of LRU 32,358 70.8 197.3
immediate (CR) block cleanout app 3 0.0 0.0
immediate (CURRENT) block cleanou 216 0.5 1.3
index fast full scans (full) 197 0.4 1.2
Instance Activity Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
Statistic Total per Second per Trans
leaf node splits 43 0.1 0.3
logons cumulative 376 0.8 2.3
messages received 566 1.2 3.5
messages sent 566 1.2 3.5
no buffer to keep pinned count 361,161 790.3 2,202.2
no work - consistent read gets 4,584,108 10,030.9 27,951.9
opened cursors cumulative 2,903 6.4 17.7
Parallel operations not downgrade 0 0.0 0.0
parse count (hard) 41 0.1 0.3
parse count (total) 2,879 6.3 17.6
parse time cpu 109 0.2 0.7
parse time elapsed 191 0.4 1.2
physical reads 66,694 145.9 406.7
physical reads direct 17,008 37.2 103.7
physical writes 16,830 36.8 102.6
physical writes direct 15,849 34.7 96.6
physical writes non checkpoint 16,523 36.2 100.8
pinned buffers inspected 0 0.0 0.0
prefetched blocks 28,860 63.2 176.0
prefetched blocks aged out before 104 0.2 0.6
process last non-idle time 395,024,325 864,385.8 2,408,684.9
PX local messages recv'd 3 0.0 0.0
PX local messages sent 2 0.0 0.0
queries parallelized 0 0.0 0.0
recovery array reads 0 0.0 0.0
recovery blocks read 0 0.0 0.0
recursive calls 31,404 68.7 191.5
recursive cpu usage 973 2.1 5.9
redo blocks written 7,766 17.0 47.4
redo buffer allocation retries 24 0.1 0.2
redo entries 9,689 21.2 59.1
redo log space requests 10 0.0 0.1
redo log space wait time 205 0.5 1.3
redo ordering marks 0 0.0 0.0
redo size 3,762,380 8,232.8 22,941.3
redo synch time 310 0.7 1.9
redo synch writes 252 0.6 1.5
redo wastage 83,944 183.7 511.9
redo write time 798 1.8 4.9
redo writer latching time 2 0.0 0.0
redo writes 348 0.8 2.1
rollback changes - undo records a 100 0.2 0.6
rollbacks only - consistent read 32 0.1 0.2
rows fetched via callback 152,467 333.6 929.7
session connect time 395,024,325 864,385.8 2,408,684.9
session logical reads 5,417,054 11,853.5 33,030.8
session pga memory 1,198,867,080 2,623,341.5 7,310,165.1
session pga memory max 1,252,931,128 2,741,643.6 7,639,824.0
session uga memory 2,021,828 4,424.1 12,328.2
session uga memory max 11,504,160 25,173.2 70,147.3
sorts (disk) 8 0.0 0.1
sorts (memory) 1,013 2.2 6.2
sorts (rows) 106,560 233.2 649.8
SQL*Net roundtrips to/from client 62,770 137.4 382.7
summed dirty queue length 2 0.0 0.0
switch current to new buffer
Instance Activity Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
Statistic Total per Second per Trans
table fetch by rowid 10,162,108 22,236.6 61,964.1
table fetch continued row 5,568 12.2 34.0
table scan blocks gotten 73,722 161.3 449.5
table scan rows gotten 3,805,522 8,327.2 23,204.4
table scans (direct read) 0 0.0 0.0
table scans (long tables) 50 0.1 0.3
table scans (rowid ranges) 0 0.0 0.0
table scans (short tables) 12,550 27.5 76.5
total file opens 1,587 3.5 9.7
transaction rollbacks 0 0.0 0.0
user calls 63,865 139.8 389.4
user commits 153 0.3 0.9
user rollbacks 11 0.0 0.1
write clones created in backgroun 0 0.0 0.0
write clones created in foregroun 27 0.1 0.2
Tablespace IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by IOs (Reads + Writes) desc
Tablespace
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
TEMP
9,953 22 0.0 1.2 11,991 26 0 0.0
APS_DATA_DYNA
18,803 41 4.4 2.3 67 0 7 2.9
TEMP1
4,163 9 0.0 1.1 3,367 7 0 0.0
APS_INDEX
1,169 3 6.3 1.6 113 0 0 0.0
PRF_DATA_DYNA
290 1 13.7 10.2 105 0 2 5.0
APS_DATA_STAT
324 1 4.4 4.6 41 0 0 0.0
TOOLS
53 0 10.2 1.0 287 1 0 0.0
PRF_INDEX
133 0 6.7 1.0 88 0 1 0.0
SYSTEM
128 0 12.9 1.7 58 0 0 0.0
RBS1
17 0 10.6 1.0 158 0 1 330.0
GRH_DATA_DYNA
72 0 7.1 1.0 78 0 0 0.0
RBS
30 0 44.7 1.0 111 0 0 0.0
GRH_INDEX
38 0 8.2 1.0 46 0 0 0.0
PRF_DATA_STAT
53 0 11.5 2.2 3 0 0 0.0
CQI_DATA_DYNA
25 0 5.2 4.2 12 0 0 0.0
CQI_INDEX
28 0 5.0 1.0 9 0 0 0.0
GRH_DATA_STAT
23 0 5.2 8.0 3 0 0 0.0
GTMAO_DATA_DYNA
20 0 0.0 1.0 6 0 0 0.0
COM_DATA_DYNA
19 0 20.5 1.0 3 0 0 0.0
COM_INDEX
18 0 6.1 1.0 3 0 0 0.0
RFG_INDEX
9 0 0.0 1.0 9 0 0 0.0
CQI_DATA_STAT
13 0 3.8 1.0 3 0 0 0.0
GFRP_DATA_DYNA
9 0 0.0 1.0 6 0 0 0.0
USERS
9 0 0.0 1.0 6 0 0 0.0
RFG_DATA_DYNA
6 0 0.0 1.0 6 0 0 0.0
GFRP_DATA_STAT
6 0 0.0 1.0 3 0 0 0.0
Tablespace IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by IOs (Reads + Writes) desc
Tablespace
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
GFRP_INDEX
6 0 0.0 1.0 3 0 0 0.0
PRF_DATA_DYNA_ARCHIVE
6 0 0.0 1.0 3 0 0 0.0
PRF_INDEX_ARCHIVE
6 0 0.0 1.0 3 0 0 0.0
COM_DATA_STAT
4 0 2.5 1.0 3 0 0 0.0
BO_DATA
3 0 0.0 1.0 3 0 0 0.0
DRSYS
3 0 0.0 1.0 3 0 0 0.0
FSQ_DATA_DYNA
3 0 0.0 1.0 3 0 0 0.0
FSQ_DATA_STAT
3 0 0.0 1.0 3 0 0 0.0
FSQ_INDEX
3 0 0.0 1.0 3 0 0 0.0
GNS_DATA_DYNA
3 0 0.0 1.0 3 0 0 0.0
GTMAO_DATA_STAT
3 0 0.0 1.0 3 0 0 0.0
GTMAO_INDEX
3 0 0.0 1.0 3 0 0 0.0
INDX
3 0 0.0 1.0 3 0 0 0.0
RFG_DATA_STAT
3 0 0.0 1.0 3 0 0 0.0
SMQ_DATA_DYNA
3 0 0.0 1.0 3 0 0 0.0
SMQ_DATA_STAT
3 0 0.0 1.0 3 0 0 0.0
SMQ_INDEX
3 0 0.0 1.0 3 0 0 0.0
File IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by Tablespace, File
Tablespace Filename
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
APS_DATA_DYNA F:\ORADATA\APS_DYNA_DF
279 1 7.0 3.4 3 0 0
F:\ORADATA\APS_DYNA_01.DF
477 1 4.9 2.2 4 0 0
F:\ORADATA\APS_DYNA_02.DF
412 1 4.5 1.5 4 0 0
F:\ORADATA\APS_DYNA_03.DF
420 1 5.1 1.3 3 0 0
F:\ORADATA\APS_DYNA_04.DF
9 0 0.0 1.0 3 0 0
F:\ORADATA\APS_DYNA_05.DF
17 0 4.1 3.0 3 0 0
F:\ORADATA\APS_DYNA_06.DF
6,158 13 4.1 1.4 11 0 6 0.0
F:\ORADATA\APS_DYNA_07.DF
8,331 18 3.4 1.4 9 0 1 20.0
F:\ORADATA\APS_DYNA_08.DF
10 0 2.0 1.0 3 0 0
G:\ORADATA\APS_DYNA_09.DF
2,172 5 7.8 8.5 7 0 0
G:\ORADATA\APS_DYNA_10.DF
518 1 6.4 2.7 17 0 0
APS_DATA_STAT F:\ORADATA\APS_STAT_DF
324 1 4.4 4.6 41 0 0
APS_INDEX F:\ORADATA\APS_IDX_003.DF
10 0 0.0 1.0 13 0 0
F:\ORADATA\APS_INDEX_DF
117 0 8.2 1.0 18 0 0
F:\ORADATA\APS_INDEX_DF02
12 0 1.7 1.0 20 0 0
F:\ORADATA\APS_INDEX_04.DF
14 0 2.9 1.0 33 0 0
F:\ORADATA\APS_INDEX_05.DF
1,016 2 6.2 1.7 29 0 0
BO_DATA F:\ORADATA\BO_DATA.DF
3 0 0.0 1.0 3 0 0
COM_DATA_DYNA E:\ORACLE\ORADATA\QLM3\COM_DATA_DYNA.ORA
19 0 20.5 1.0 3 0 0
COM_DATA_STAT E:\ORACLE\ORADATA\QLM3\COM_DATA_STAT.ORA
4 0 2.5 1.0 3 0 0
COM_INDEX F:\ORADATA\COM_INDEX.DF
18 0 6.1 1.0 3 0 0
CQI_DATA_DYNA G:\ORADATA\CQI_DATA_DYNA_01.DF
25 0 5.2 4.2 12 0 0
File IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by Tablespace, File
Tablespace Filename
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
CQI_DATA_STAT G:\ORADATA\CQI_DATA_STAT_01.DF
13 0 3.8 1.0 3 0 0
CQI_INDEX G:\ORADATA\CQI_INDEX_01.DF
28 0 5.0 1.0 9 0 0
DRSYS E:\ORACLE\ORADATA\QLM3\DR01.DBF
3 0 0.0 1.0 3 0 0
FSQ_DATA_DYNA F:\ORADATA\FSQ_DYNA_DF
3 0 0.0 1.0 3 0 0
FSQ_DATA_STAT F:\ORADATA\FSQ_STAT_DF
3 0 0.0 1.0 3 0 0
FSQ_INDEX F:\ORADATA\FSQ_INDEX_DF
3 0 0.0 1.0 3 0 0
GFRP_DATA_DYNA G:\ORADATA\GFRP_DYNA_01.DF
6 0 0.0 1.0 3 0 0
H:\ORADATA\GFRP_DATA_DYNA
3 0 0.0 1.0 3 0 0
GFRP_DATA_STAT G:\ORADATA\GFRP_STAT_01.DF
6 0 0.0 1.0 3 0 0
GFRP_INDEX G:\ORADATA\GFRP_INDEX_01.DF
6 0 0.0 1.0 3 0 0
GNS_DATA_DYNA F:\ORADATA\GNS_DATA_DYNA_01.ORA
3 0 0.0 1.0 3 0 0
GRH_DATA_DYNA F:\ORADATA\GRH_DY_1.DF
38 0 11.3 1.0 37 0 0
F:\ORADATA\GRH_DY_2.DF
3 0 0.0 1.0 5 0 0
F:\ORADATA\GRH_DY_3.DF
3 0 0.0 1.0 3 0 0
F:\ORADATA\GRH_DY_4.DF
13 0 6.2 1.0 18 0 0
F:\ORADATA\GRH_DY_5.DF
3 0 0.0 1.0 3 0 0
F:\ORADATA\GRH_DY_6.DF
3 0 0.0 1.0 3 0 0
F:\ORADATA\GRH_DY_7.DF
3 0 0.0 1.0 3 0 0
H:\ORADATA\GRH_DY_8.DF
3 0 0.0 1.0 3 0 0
H:\ORADATA\GRH_DY_9.DF
3 0 0.0 1.0 3 0 0
GRH_DATA_STAT F:\ORADATA\GRH_ST_1.DF
File IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by Tablespace, File
Tablespace Filename
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
23 0 5.2 8.0 3 0 0
GRH_INDEX F:\ORADATA\GRH_IDX.DF
38 0 8.2 1.0 46 0 0
GTMAO_DATA_DYNA F:\ORADATA\GTMAO_DATA_DYNA_01.DF
10 0 0.0 1.0 3 0 0
F:\ORADATA\GTM_DY_2.DF
10 0 0.0 1.0 3 0 0
GTMAO_DATA_STAT F:\ORADATA\GTMAO_DATA_STAT_01.DF
3 0 0.0 1.0 3 0 0
GTMAO_INDEX F:\ORADATA\GTMAO_INDEX_01.DF
3 0 0.0 1.0 3 0 0
INDX E:\ORACLE\ORADATA\QLM3\INDX01.DBF
3 0 0.0 1.0 3 0 0
PRF_DATA_DYNA E:\ORADATA\PRF_D14.DF
29 0 10.3 1.0 12 0 0
E:\ORADATA\PRF_D15.DF
28 0 10.4 1.0 19 0 0
E:\ORADATA\PRF_D16.DF
89 0 31.9 26.9 9 0 0
F:\ORADATA\PRF_D1.DF
9 0 5.6 1.0 4 0 0
F:\ORADATA\PRF_D10.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D11.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D12.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D13.DF
26 0 7.7 7.2 3 0 2 5.0
F:\ORADATA\PRF_D2.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D3.DF
6 0 0.0 1.0 5 0 0
F:\ORADATA\PRF_D4.DF
15 0 4.0 1.0 10 0 0
F:\ORADATA\PRF_D5.DF
15 0 4.0 1.0 10 0 0
F:\ORADATA\PRF_D6.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D7.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D8.DF
6 0 0.0 1.0 3 0 0
F:\ORADATA\PRF_D9.DF
6 0 0.0 1.0 3 0 0
G:\ORADATA\PRF_D17.DF
File IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by Tablespace, File
Tablespace Filename
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
16 0 7.5 13.3 3 0 0
PRF_DATA_DYNA G:\ORADATA\PRF_D18.DF
9 0 6.7 1.0 6 0 0
PRF_DATA_DYNA_ARCHIVE H:\ORADATA\PRF_DATA_DYNA_ARCHIVE01.DF
6 0 0.0 1.0 3 0 0
PRF_DATA_STAT F:\ORADATA\PRF_ST1.DF
53 0 11.5 2.2 3 0 0
PRF_INDEX E:\ORADATA\PRF_IDX4.DF
14 0 7.1 1.0 10 0 0
E:\ORADATA\PRF_IDX5.DF
13 0 3.8 1.0 10 0 0
E:\ORADATA\PRF_IDX6.DF
18 0 8.3 1.0 12 0 0
E:\ORADATA\PRF_IDX7.DF
10 0 2.0 1.0 3 0 0
F:\ORADATA\PRF_IDX1.DF
8 0 2.5 1.0 4 0 0
F:\ORADATA\PRF_IDX2.DF
11 0 3.6 1.0 11 0 0
F:\ORADATA\PRF_IDX3.DF
43 0 7.9 1.0 28 0 1 0.0
H:\ORADATA\PRF_IDX8.DF
16 0 10.6 1.0 10 0 0
PRF_INDEX_ARCHIVE H:\ORADATA\PRF_INDEX_ARCHIVE_01.DF
6 0 0.0 1.0 3 0 0
RBS E:\ORACLE\ORADATA\QLM3\RBS01.DBF
22 0 59.1 1.0 92 0 0
E:\ORACLE\ORADATA\QLM3\RBS02.DBF
8 0 5.0 1.0 19 0 0
RBS1 E:\ORACLE\ORADATA\QLM3\RBS11.ORA
3 0 0.0 1.0 18 0 1 330.0
E:\ORACLE\ORADATA\QLM3\RBS12.ORA
5 0 24.0 1.0 12 0 0
E:\ORACLE\ORADATA\QLM3\RBS13.ORA
9 0 6.7 1.0 128 0 0
RFG_DATA_DYNA G:\ORADATA\RFG_DATA_DYNA_01.DF
3 0 0.0 1.0 3 0 0
G:\ORADATA\RFG_DATA_DYNA_02.DF
3 0 0.0 1.0 3 0 0
RFG_DATA_STAT G:\ORADATA\RFG_DATA_STAT_01.DF
3 0 0.0 1.0 3 0 0
RFG_INDEX G:\ORADATA\RFG_INDEX_01.DF
3 0 0.0 1.0 3 0 0
File IO Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->ordered by Tablespace, File
Tablespace Filename
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
RFG_INDEX G:\ORADATA\RFG_INDEX_02.DF
3 0 0.0 1.0 3 0 0
G:\ORADATA\RFG_INDEX_03.DF
3 0 0.0 1.0 3 0 0
SMQ_DATA_DYNA F:\ORADATA\SMQ_DYNA_DF
3 0 0.0 1.0 3 0 0
SMQ_DATA_STAT F:\ORADATA\SMQ_STAT_DF
3 0 0.0 1.0 3 0 0
SMQ_INDEX F:\ORADATA\SMQ_INDEX_DF
3 0 0.0 1.0 3 0 0
SYSTEM E:\ORACLE\ORADATA\QLM3\SYSTEM01.DBF
119 0 12.8 1.6 53 0 0
E:\ORACLE\ORADATA\QLM3\SYSTEM02.DBF
9 0 14.4 3.6 5 0 0
TEMP E:\ORACLE\ORADATA\QLM3\TEMP01.DBF
9,953 22 0.0 1.2 11,991 26 0
TEMP1 H:\ORADATA\TEMP101.ORA
4,163 9 0.0 1.1 3,367 7 0
TOOLS E:\ORACLE\ORADATA\QLM3\TOOLS01.DBF
3 0 0.0 1.0 27 0 0
E:\ORACLE\ORADATA\QLM3\TOOLS02.DBF
50 0 10.8 1.0 260 1 0
USERS E:\ORACLE\ORADATA\QLM3\USERS01.DBF
3 0 0.0 1.0 3 0 0
E:\ORACLE\ORADATA\QLM3\USERS02.DBF
6 0 0.0 1.0 3 0 0
Buffer Pool Statistics for DB: QLM3 Instance: orcl Snaps: 1 -2
-> Pools D: default pool, K: keep pool, R: recycle pool
Free Write Buffer
Buffer Consistent Physical Physical Buffer Complete Busy
P Gets Gets Reads Writes Waits Waits Waits
D 50,061 0 49,675 981 0 0 11
Buffer wait Statistics for DB: QLM3 Instance: orcl Snaps: 1 -2
-> ordered by wait time desc, waits desc
Tot Wait Avg
Class Waits Time (cs) Time (cs)
undo header 1 33 33
data block 10 3 0
Rollback Segment Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->A high value for "Pct Waits" suggests more rollback segments may be required
Trans Table Pct Undo Bytes
RBS No Gets Waits Written Wraps Shrinks Extends
0 24.0 0.00 0 0 0 0
1 78.0 0.00 16,834 0 0 0
2 84.0 0.00 29,374 0 0 0
3 65.0 0.00 9,950 0 0 0
4 67.0 0.00 14,278 0 0 0
5 66.0 0.00 16,364 0 0 0
6 64.0 0.00 6,144 0 0 0
7 176.0 0.00 58,588 0 0 0
8 69.0 0.00 23,158 0 0 0
9 90.0 0.00 15,068 0 0 0
10 64.0 0.00 9,776 0 0 0
11 69.0 0.00 11,076 0 0 0
12 298.0 0.34 647,830 2 0 0
13 101.0 0.00 233,506 0 0 0
Rollback Segment Storage for DB: QLM3 Instance: orcl Snaps: 1 -2
->Optimal Size should be larger than Avg Active
RBS No Segment Size Avg Active Optimal Size Maximum Size
0 401,408 0 401,408
1 4,186,112 540,690 4,194,304 4,186,112
2 4,186,112 663,298 4,194,304 4,186,112
3 4,186,112 536,369 4,194,304 4,186,112
4 4,186,112 552,957 4,194,304 4,186,112
5 4,186,112 566,795 4,194,304 4,186,112
6 4,186,112 565,140 4,194,304 4,186,112
7 4,186,112 524,103 4,194,304 4,186,112
8 251,854,848 534,027 251,854,848
9 48,447,488 630,996 48,447,488
10 29,810,688 609,701 29,810,688
11 21,823,488 531,386 21,823,488
12 30,875,648 1,398,641 30,875,648
13 15,720,448 4,922,485 20,963,328
Latch Activity for DB: QLM3 Instance: orcl Snaps: 1 -2
->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
willing-to-wait latch get requests
->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
->"Pct Misses" for both should be very close to 0.0
Pct Avg Pct
Get Get Slps NoWait NoWait
Latch Name Requests Miss /Miss Requests Miss
active checkpoint queue latch 395 0.0 0
cache buffer handles 118 0.0 0
cache buffers chains 10,212,613 0.0 0.0 83,659 0.0
cache buffers lru chain 88,174 0.0 0.4 0
channel handle pool latch 18 0.0 23 0.0
channel operations parent lat 36 0.0 23 0.0
checkpoint queue latch 4,264 0.0 0
dml lock allocation 1,219 0.0 0
enqueue hash chains 3,289 0.0 0.0 0
enqueues 5,614 0.0 0
error message lists 9 0.0 0
event group latch 18 0.0 0
file number translation table 10 0.0 0
job_queue_processes parameter 8 0.0 0
ktm global data 3 0.0 0
latch wait list 36 0.0 36 0.0
library cache 287,494 0.1 0.2 92 0.0
library cache load lock 46 0.0 0
list of block allocation 774 0.0 0
loader state object freelist 72 0.0 0
longop free list 535 0.0 0
messages 3,858 0.0 0.0 0
multiblock read objects 11,104 0.0 0
ncodef allocation latch 8 0.0 0
parallel query alloc buffer 32 3.1 0.0 0
parallel query stats 6 0.0 0
parallel txn reco latch 3,083 0.0 0
process allocation 18 0.0 18 0.0
process group creation 41 0.0 0
process queue 18 0.0 0
process queue reference 2,886 0.0 14 0.0
query server freelists 27 0.0 0
query server process 4 0.0 4 0.0
redo allocation 10,454 0.0 0.0 0
redo writing 2,223 0.0 0
row cache objects 38,374 0.0 0.0 12 0.0
sequence cache 383 0.0 0
session allocation 3,315 0.1 1.3 0
session idle bit 128,781 0.0 0.0 0
session switching 8 0.0 0
session timer 149 0.0 0
shared pool 19,330 0.0 0.2 0
sort extent pool 172 0.0 0
Token Manager 904 0.0 12 0.0
transaction allocation 1,143 0.0 0
transaction branch allocation 8 0.0 0
undo global data 1,833 0.0 0
user lock 66 0.0 0
virtual circuit queues 22 0.0 0
Latch Activity for DB: QLM3 Instance: orcl Snaps: 1 -2
->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
willing-to-wait latch get requests
->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
->"Pct Misses" for both should be very close to 0.0
Pct Avg Pct
Get Get Slps NoWait NoWait
Latch Name Requests Miss /Miss Requests Miss
Latch Sleep breakdown for DB: QLM3 Instance: orcl Snaps: 1 -2
-> ordered by misses desc
Get Spin &
Latch Name Requests Misses Sleeps Sleeps 1->4
cache buffers chains 10,212,613 224 9 217/5/2/0/0
library cache 287,494 211 44 176/29/3/3/0
cache buffers lru chain 88,174 20 8 16/0/4/0/0
shared pool 19,330 9 2 8/0/1/0/0
session allocation 3,315 3 4 1/1/0/1/0
Latch Miss Sources for DB: QLM3 Instance: orcl Snaps: 1 -2
-> only latches with sleeps are shown
-> ordered by name, sleeps desc
NoWait Waiter
Latch Name Where Misses Sleeps Sleeps
cache buffers chains kcbgtcr: kslbegin 0 7 9
cache buffers chains kcbgtcr 0 2 0
cache buffers lru chain kcbbiop: lru scan 0 8 0
library cache kglic 0 24 2
library cache kglhdgn: child: 0 18 8
library cache kglget: child: KGLDSBYD 0 1 1
library cache kglpnal: child: alloc spac 0 1 1
session allocation ksuxds: KSUSFCLC not set 0 4 0
shared pool kghfrunp: alloc: clatch no 0 2 0
Dictionary Cache Stats for DB: QLM3 Instance: orcl Snaps: 1 -2
->"Pct Misses" should be very low (< 2% in most cases)
->"Cache Usage" is the number of cache entries being used
->"Pct SGA" is the ratio of usage to allocated size for that cache
Get Pct Scan Pct Mod Final Pct
Cache Requests Miss Requests Miss Req Usage SGA
dc_constraints 0 0 0 188 99
dc_database_links 0 0 0 0 0
dc_files 0 0 0 16 94
dc_free_extents 26 23.1 9 0.0 19 2,072 99
dc_global_oids 0 0 0 28 62
dc_histogram_data 0 0 0 0 0
dc_histogram_data_valu 0 0 0 0 0
dc_histogram_defs 597 0.0 0 0 ###### 100
dc_object_ids 3,481 0.0 0 0 4,068 100
dc_objects 606 1.5 0 0 8,596 100
dc_outlines 0 0 0 0 0
dc_profiles 14 0.0 0 0 1 9
dc_rollback_segments 394 0.0 0 0 15 54
dc_segments 260 0.0 0 9 4,752 100
dc_sequence_grants 104 0.0 0 0 169 92
dc_sequences 183 0.0 0 169 36 86
dc_synonyms 280 5.7 0 0 4,343 100
dc_tablespace_quotas 33 0.0 0 9 18 23
dc_tablespaces 2,965 0.0 0 0 45 78
dc_used_extents 9 100.0 0 9 2,086 53
dc_user_grants 2,213 0.0 0 0 109 93
dc_usernames 289 0.0 0 0 131 99
dc_users 2,790 0.0 0 0 209 95
ifs_acl_cache_entries 0 0 0 0 0
Library Cache Activity for DB: QLM3 Instance: orcl Snaps: 1 -2
->"Pct Misses" should be very low
Get Pct Pin Pct Invali-
Namespace Requests Miss Requests Miss Reloads dations
BODY 22 0.0 21 0.0 0 0
CLUSTER 0 0 0 0
INDEX 0 0 0 0
OBJECT 0 0 0 0
PIPE 0 0 0 0
SQL AREA 2,846 0.2 48,618 0.2 25 0
TABLE/PROCEDURE 7,107 0.2 29,746 0.2 3 0
TRIGGER 22 0.0 22 0.0 0 0
SGA Memory Summary for DB: QLM3 Instance: orcl Snaps: 1 -2
SGA regions Size in Bytes
Database Buffers 157,286,400
Fixed Size 75,804
Redo Buffers 172,032
Variable Size 185,597,952
sum 343,132,188
SGA breakdown difference for DB: QLM3 Instance: orcl Snaps: 1 -2
Pool Name Begin value End value Difference
java pool free memory 45,973,504 45,973,504 0
java pool memory in use 4,030,464 4,030,464 0
large pool free memory 614,400 614,400 0
shared pool db_block_buffers 2,611,200 2,611,200 0
shared pool db_block_hash_buckets 438,520 438,520 0
shared pool db_files 370,988 370,988 0
shared pool dictionary cache 21,129,860 21,141,516 11,656
shared pool event statistics per ses 774,000 774,000 0
shared pool fixed allocation callbac 640 640 0
shared pool free memory 15,115,180 16,081,664 966,484
shared pool joxlod: in ehe 91,888 91,888 0
shared pool joxlod: in phe 37,284 37,284 0
shared pool joxlod: init P 812 812 0
shared pool joxs heap init 4,248 4,248 0
shared pool KGFF heap 69,160 69,160 0
shared pool KGK heap 19,236 19,236 0
shared pool KQLS heap 8,262,784 8,225,444 -37,340
shared pool library cache 29,124,008 29,099,824 -24,184
shared pool miscellaneous 5,152,512 5,135,872 -16,640
shared pool partitioning d 203,808 185,716 -18,092
shared pool PLS non-lib hp 2,096 2,096 0
shared pool PL/SQL DIANA 3,668,952 3,659,000 -9,952
shared pool PL/SQL MPCODE 1,560,124 1,563,104 2,980
shared pool PL/SQL PPCODE 19,460 19,460 0
shared pool PX msg pool 46,572 46,572 0
shared pool PX subheap 11,612 11,612 0
shared pool sessions 485,100 485,100 0
shared pool sql area 45,274,860 44,405,220 -869,640
shared pool table columns 53,228 53,564 336
shared pool table definiti 16,748 15,428 -1,320
shared pool transaction_branches 368,000 368,000 0
shared pool trigger defini 41,236 36,948 -4,288
shared pool trigger inform 3,380 3,380 0
shared pool trigger source 572 572 0
shared pool type object de 1,600 1,600 0
shared pool view columns d 1,072 1,072 0
db_block_buffers 157,286,400 157,286,400 0
fixed_sga 75,804 75,804 0
log_buffer 163,840 163,840 0
init.ora Parameters for DB: QLM3 Instance: orcl Snaps: 1 -2
End value
Parameter Name Begin value (if different)
audit_trail TRUE
background_dump_dest E:\oracle\admin\QLM3\bdump
compatible 8.1.7.0
control_files E:\oracle\oradata\QLM3\control01.
cursor_sharing EXACT
db_block_buffers 19200
db_block_size 8192
db_file_multiblock_read_count 32
db_files 1024
db_name QLM3
distributed_transactions 500
global_names FALSE
instance_name ORCL
java_pool_size 50000000
job_queue_interval 10
job_queue_processes 4
large_pool_size 614400
log_buffer 163840
log_checkpoint_interval 5000
log_checkpoint_timeout 0
max_dump_file_size 10240
max_enabled_roles 30
mts_dispatchers (PROTOCOL=TCP)(PRE=oracle.aurora.
open_cursors 1000
open_links 4
oracle_trace_collection_name
os_authent_prefix
parallel_max_servers 8
processes 200
query_rewrite_enabled TRUE
query_rewrite_integrity TRUSTED
remote_login_passwordfile EXCLUSIVE
rollback_segments RBS10, RBS11, RBS12, RBS13, RBS14
service_names QLM3
shared_pool_size 128000000
sort_area_retained_size 128000
sort_area_size 128000
timed_statistics TRUE
user_dump_dest E:\oracle\admin\QLM3\udump
utl_file_dir c:\utl_file
End of Report.
Thanks for your help.
regards raitsarevoHi
I'm experienced any problem when our application run one transaction it becomes very slow, before it was speed and from yesterday it takes a lot of time to accomplish the transaction. That's why i analyze the problem with statspack and i've done also a trace. It's for my problem and for academic purpose too.
Many thanks for your help. -
STATSPACK. What to look for ?
my users have been complaining that the application is very slow. What do i need to look for in this report.
STATSPACK report for
DB Name DB Id Instance Inst Num Release Cluster Host
XXXX 629101424 XXXX 1 9.2.0.6.0 NO scheduprod-s
ol
Snap Id Snap Time Sessions Curs/Sess Comment
Begin Snap: 4527 12-Mar-07 15:02:05 81 231.9
End Snap: 4531 12-Mar-07 15:42:01 81 234.1
Elapsed: 39.93 (mins)
Cache Sizes (end)
~~~~~~~~~~~~~~~~~
Buffer Cache: 304M Std Block Size: 8K
Shared Pool Size: 608M Log Buffer: 512K
Load Profile
~~~~~~~~~~~~ Per Second Per Transaction
Redo size: 3,891.02 2,878.32
Logical reads: 865.79 640.45
Block changes: 22.12 16.36
Physical reads: 13.86 10.25
Physical writes: 0.61 0.45
User calls: 231.43 171.20
Parses: 48.95 36.21
Hard parses: 8.44 6.25
Sorts: 4.25 3.14
Logons: 0.15 0.11
Executes: 51.42 38.04
Transactions: 1.35
% Blocks changed per Read: 2.55 Recursive Call %: 17.42
Rollback per transaction %: 2.53 Rows per Sort: 55.75
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 99.13 In-memory Sort %: 100.00
Library Hit %: 91.94 Soft Parse %: 82.75
Execute to Parse %: 4.81 Latch Hit %: 99.97
Parse CPU to Parse Elapsd %: 98.26 % Non-Parse CPU: 50.19
Shared Pool Statistics Begin End
Memory Usage %: 97.40 97.69
% SQL with executions>1: 18.64 31.84
% Memory for SQL w/exec>1: 17.60 31.65
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
CPU time 342 50.98
log file parallel write 7,798 138 20.59
log file sync 3,587 128 19.03
db file parallel write 193 29 4.39
control file parallel write 790 21 3.20
^LWait Events for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
log file parallel write 7,798 0 138 18 2.4
log file sync 3,587 0 128 36 1.1
db file parallel write 193 0 29 153 0.1
control file parallel write 790 0 21 27 0.2
SQL*Net more data to client 111,847 0 6 0 34.5
db file sequential read 432 0 2 5 0.1
db file scattered read 2,419 0 1 0 0.7
latch free 698 0 1 1 0.2
process startup 14 0 1 47 0.0
direct path read (lob) 14,912 0 1 0 4.6
SQL*Net break/reset to clien 920 0 0 0 0.3
control file sequential read 822 0 0 0 0.3
SQL*Net message from client 454,457 0 35,768 79 140.3
virtual circuit status 40,421 81 4,724 117 12.5
wakeup time manager 79 79 2,248 28461 0.0
jobq slave wait 264 252 765 2897 0.1
SQL*Net message to client 454,457 0 1 0 140.3
SQL*Net more data from clien 328 0 0 0 0.1
^LBackground Wait Events for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
log file parallel write 7,798 0 138 18 2.4
db file parallel write 193 0 29 153 0.1
control file parallel write 790 0 21 27 0.2
process startup 2 0 0 35 0.0
control file sequential read 556 0 0 0 0.2
rdbms ipc reply 3 0 0 1 0.0
latch free 2 0 0 0 0.0
rdbms ipc message 6,444 2,366 13,269 2059 2.0
smon timer 8 8 2,344 ###### 0.0
pmon timer 834 834 2,339 2804 0.3
^LInstance Activity Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
Statistic Total per Second per Trans
CPU used by this session 34,169 14.3 10.6
CPU used when call started 33,176 13.9 10.2
CR blocks created 83 0.0 0.0
DBWR buffers scanned 0 0.0 0.0
DBWR checkpoint buffers written 1,459 0.6 0.5
DBWR checkpoints 0 0.0 0.0
DBWR free buffers found 0 0.0 0.0
DBWR lru scans 0 0.0 0.0
DBWR make free requests 0 0.0 0.0
DBWR revisited being-written buff 0 0.0 0.0
DBWR summed scan depth 0 0.0 0.0
DBWR transaction table writes 13 0.0 0.0
DBWR undo block writes 787 0.3 0.2
PX local messages recv'd 0 0.0 0.0
PX local messages sent 0 0.0 0.0
SQL*Net roundtrips to/from client 492,393 205.5 152.0
SQL*Net roundtrips to/from dblink 0 0.0 0.0
active txn count during cleanout 100 0.0 0.0
background checkpoints completed 0 0.0 0.0
background checkpoints started 0 0.0 0.0
background timeouts 2,898 1.2 0.9
branch node splits 0 0.0 0.0
buffer is not pinned count 1,617,141 674.9 499.3
buffer is pinned count 3,219,198 1,343.6 993.9
bytes received via SQL*Net from c 48,664,626 20,310.8 15,024.6
bytes received via SQL*Net from d 0 0.0 0.0
bytes sent via SQL*Net to client 380,182,385 158,673.8 117,376.5
bytes sent via SQL*Net to dblink 0 0.0 0.0
calls to get snapshot scn: kcmgss 370,472 154.6 114.4
calls to kcmgas 5,800 2.4 1.8
calls to kcmgcs 319 0.1 0.1
change write time 91 0.0 0.0
cleanout - number of ktugct calls 178 0.1 0.1
cleanouts and rollbacks - consist 0 0.0 0.0
cleanouts only - consistent read 15 0.0 0.0
cluster key scan block gets 88,031 36.7 27.2
cluster key scans 44,560 18.6 13.8
commit cleanout failures: block l 0 0.0 0.0
commit cleanout failures: buffer 0 0.0 0.0
commit cleanout failures: callbac 0 0.0 0.0
commit cleanout failures: cannot 0 0.0 0.0
commit cleanouts 16,509 6.9 5.1
commit cleanouts successfully com 16,509 6.9 5.1
commit txn count during cleanout 140 0.1 0.0
consistent changes 162 0.1 0.1
consistent gets 2,042,196 852.3 630.5
consistent gets - examination 578,365 241.4 178.6
cursor authentications 7,954 3.3 2.5
data blocks consistent reads - un 162 0.1 0.1
db block changes 52,993 22.1 16.4
db block gets 47,334 19.8 14.6
deferred (CURRENT) block cleanout 4,180 1.7 1.3
dirty buffers inspected 0 0.0 0.0
enqueue conversions 117 0.1 0.0
enqueue releases 32,269 13.5 10.0
enqueue requests 32,270 13.5 10.0
^LInstance Activity Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
Statistic Total per Second per Trans
enqueue timeouts 0 0.0 0.0
enqueue waits 0 0.0 0.0
execute count 123,202 51.4 38.0
free buffer inspected 0 0.0 0.0
free buffer requested 19,766 8.3 6.1
hot buffers moved to head of LRU 23 0.0 0.0
immediate (CR) block cleanout app 15 0.0 0.0
immediate (CURRENT) block cleanou 5,664 2.4 1.8
index fast full scans (full) 6 0.0 0.0
index fetch by key 214,924 89.7 66.4
index scans kdiixs1 554,891 231.6 171.3
leaf node 90-10 splits 9 0.0 0.0
leaf node splits 61 0.0 0.0
logons cumulative 362 0.2 0.1
messages received 3,953 1.7 1.2
messages sent 3,953 1.7 1.2
no buffer to keep pinned count 0 0.0 0.0
no work - consistent read gets 894,670 373.4 276.2
opened cursors cumulative 116,168 48.5 35.9
parse count (failures) 9 0.0 0.0
parse count (hard) 20,231 8.4 6.3
parse count (total) 117,273 49.0 36.2
parse time cpu 17,018 7.1 5.3
parse time elapsed 17,319 7.2 5.4
physical reads 33,199 13.9 10.3
physical reads direct 0 0.0 0.0
physical reads direct (lob) 15,100 6.3 4.7
physical writes 1,459 0.6 0.5
physical writes direct 0 0.0 0.0
physical writes direct (lob) 0 0.0 0.0
physical writes non checkpoint 496 0.2 0.2
pinned buffers inspected 0 0.0 0.0
prefetch clients - default 0 0.0 0.0
prefetched blocks 15,247 6.4 4.7
prefetched blocks aged out before 0 0.0 0.0
process last non-idle time 2,396 1.0 0.7
recursive calls 116,941 48.8 36.1
recursive cpu usage 1,523 0.6 0.5
redo blocks written 20,871 8.7 6.4
redo buffer allocation retries 0 0.0 0.0
redo entries 29,618 12.4 9.1
redo log space requests 0 0.0 0.0
redo log space wait time 0 0.0 0.0
redo ordering marks 0 0.0 0.0
redo size 9,322,888 3,891.0 2,878.3
redo synch time 13,084 5.5 4.0
redo synch writes 3,587 1.5 1.1
redo wastage 1,028,916 429.4 317.7
redo write time 14,064 5.9 4.3
redo writer latching time 0 0.0 0.0
redo writes 3,899 1.6 1.2
rollback changes - undo records a 422 0.2 0.1
rollbacks only - consistent read 162 0.1 0.1
rows fetched via callback 350,472 146.3 108.2
session connect time 0 0.0 0.0
session logical reads 2,074,430 865.8 640.5
^LInstance Activity Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
Statistic Total per Second per Trans
session pga memory 14,446,752 6,029.5 4,460.3
session pga memory max 24,898,104 10,391.5 7,687.0
session uga memory 17,184,593,312 7,172,200.9 5,305,524.3
session uga memory max 28,405,696 11,855.5 8,769.9
shared hash latch upgrades - no w 546,341 228.0 168.7
shared hash latch upgrades - wait 1 0.0 0.0
sorts (disk) 0 0.0 0.0
sorts (memory) 10,174 4.3 3.1
sorts (rows) 567,241 236.7 175.1
summed dirty queue length 0 0.0 0.0
switch current to new buffer 1,334 0.6 0.4
table fetch by rowid 1,958,222 817.3 604.6
table fetch continued row 1,912 0.8 0.6
table scan blocks gotten 143,317 59.8 44.3
table scan rows gotten 7,318,367 3,054.4 2,259.5
table scans (long tables) 15 0.0 0.0
table scans (short tables) 2,029 0.9 0.6
transaction rollbacks 421 0.2 0.1
user calls 554,503 231.4 171.2
user commits 3,157 1.3 1.0
user rollbacks 82 0.0 0.0
workarea executions - multipass 0 0.0 0.0
workarea executions - onepass 0 0.0 0.0
workarea executions - optimal 14,430 6.0 4.5
write clones created in backgroun 0 0.0 0.0
write clones created in foregroun 1 0.0 0.0
^LTablespace IO Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->ordered by IOs (Reads + Writes) desc
Tablespace
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
USERS
17,588 7 0.1 1.9 69 0 0 0.0
UNDOTBLSPCE
0 0 0.0 802 0 0 0.0
PERFSTAT
136 0 14.2 1.0 315 0 0 0.0
SCHEDWIN_INDX
20 0 10.5 1.0 164 0 0 0.0
INDX
14 0 11.4 1.0 96 0 0 0.0
SYSTEM
0 0 0.0 13 0 0 0.0
File IO Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->ordered by Tablespace, File
Tablespace Filename
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
INDX /opt/u01/oradata/XXXX/dbf/indx01.dbf
14 0 11.4 1.0 96 0 0
PERFSTAT /opt/u01/oradata/XXXX/dbf/perfstat01.dbf
136 0 14.2 1.0 315 0 0
SCHEDWIN_INDX /opt/u01/oradata/XXXX/dbf/schedwin_indx01.dbf
10 0 12.0 1.0 94 0 0
/opt/u02/oradata/XXXX/dbf/schedwin_indx02.dbf
10 0 9.0 1.0 70 0 0
SYSTEM /opt/u01/oradata/XXXX/dbf/system01.dbf
0 0 13 0 0
UNDOTBLSPCE /opt/u01/oradata/XXXX/dbf/undotblspce01.dbf
0 0 802 0 0
USERS /opt/u01/oradata/XXXX/dbf/users01.dbf
11,608 5 0.1 1.4 43 0 0
/opt/u02/oradata/XXXX/dbf/users02.dbf
2,369 1 0.5 3.4 14 0 0
/opt/u03/oradata/XXXX/dbf/users03.dbf
3,611 2 0.2 2.4 12 0 0
^LBuffer Pool Statistics for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> Standard block size Pools D: default, K: keep, R: recycle
-> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k
Free Write Buffer
Number of Cache Buffer Physical Physical Buffer Complete Busy
P Buffers Hit % Gets Reads Writes Waits Waits Waits
D 37,715 99.1 2,073,831 18,097 1,459 0 0 0
Instance Recovery Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> B: Begin snapshot, E: End snapshot
Targt Estd Log File Log Ckpt Log Ckpt
MTTR MTTR Recovery Actual Target Size Timeout Interval
(s) (s) Estd IOs Redo Blks Redo Blks Redo Blks Redo Blks Redo Blks
B 160 34 1278 19692 19707 110592 19707
E 160 30 1056 17051 16555 110592 16555
Buffer Pool Advisory for DB: XXXX Instance: XXXX End Snap: 4531
-> Only rows with estimated physical reads >0 are displayed
-> ordered by Block Size, Buffers For Estimate (default block size first)
Size for Size Buffers for Est Physical Estimated
P Estimate (M) Factr Estimate Read Factor Physical Reads
D 32 .1 3,970 2.53 37,533,655
D 64 .2 7,940 2.07 30,675,635
D 96 .3 11,910 1.81 26,843,986
D 128 .4 15,880 1.67 24,744,049
D 160 .5 19,850 1.61 23,889,520
D 192 .6 23,820 1.57 23,290,550
D 224 .7 27,790 1.36 20,129,947
D 256 .8 31,760 1.16 17,216,468
D 288 .9 35,730 1.05 15,577,531
D 304 1.0 37,715 1.00 14,849,589
D 320 1.1 39,700 0.96 14,224,396
D 352 1.2 43,670 0.89 13,166,810
D 384 1.3 47,640 0.85 12,628,194
D 416 1.4 51,610 0.84 12,417,548
D 448 1.5 55,580 0.82 12,242,048
D 480 1.6 59,550 0.82 12,197,717
D 512 1.7 63,520 0.82 12,148,615
D 544 1.8 67,490 0.81 12,085,500
D 576 1.9 71,460 0.81 12,032,229
D 608 2.0 75,430 0.81 11,972,157
D 640 2.1 79,400 0.80 11,902,712
^LPGA Aggr Target Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> B: Begin snap E: End snap (rows dentified with B or E contain data
which is absolute i.e. not diffed over the interval)
-> PGA cache hit % - percentage of W/A (WorkArea) data processed only in-memory
-> Auto PGA Target - actual workarea memory target
-> W/A PGA Used - amount of memory used for all Workareas (manual + auto)
-> %PGA W/A Mem - percentage of PGA memory allocated to workareas
-> %Auto W/A Mem - percentage of workarea memory controlled by Auto Mem Mgmt
-> %Man W/A Mem - percentage of workarea memory under manual control
PGA Cache Hit % W/A MB Processed Extra W/A MB Read/Written
100.0 219 0
%PGA %Auto %Man
PGA Aggr Auto PGA PGA Mem W/A PGA W/A W/A W/A Global Mem
Target(M) Target(M) Alloc(M) Used(M) Mem Mem Mem Bound(K)
B 245 200 40.2 0.3 .7 11.8 88.2 12,544
E 245 200 40.8 0.3 .7 11.8 88.2 12,544
PGA Aggr Target Histogram for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> Optimal Executions are purely in-memory operations
Low High
Optimal Optimal Total Execs Optimal Execs 1-Pass Execs M-Pass Execs
8K 16K 14,257 14,257 0 0
16K 32K 124 124 0 0
32K 64K 62 62 0 0
64K 128K 14 14 0 0
128K 256K 8 8 0 0
256K 512K 5 5 0 0
512K 1024K 4 4 0 0
1M 2M 32 32 0 0
2M 4M 2 2 0 0
4M 8M 2 2 0 0
PGA Memory Advisory for DB: XXXX Instance: XXXX End Snap: 4531
-> When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value
where Estd PGA Overalloc Count is 0
Estd Extra Estd PGA Estd PGA
PGA Target Size W/A MB W/A MB Read/ Cache Overalloc
Est (MB) Factr Processed Written to Disk Hit % Count
31 0.1 70,206.2 6,260.3 92.0 5
61 0.3 70,206.2 4,168.3 94.0 0
123 0.5 70,206.2 3,168.1 96.0 0
184 0.8 70,206.2 2,757.2 96.0 0
245 1.0 70,206.2 1,869.3 97.0 0
294 1.2 70,206.2 1,125.7 98.0 0
343 1.4 70,206.2 1,002.5 99.0 0
392 1.6 70,206.2 930.4 99.0 0
441 1.8 70,206.2 888.9 99.0 0
490 2.0 70,206.2 888.9 99.0 0
735 3.0 70,206.2 635.4 99.0 0
980 4.0 70,206.2 428.8 99.0 0
1,470 6.0 70,206.2 377.1 99.0 0
1,960 8.0 70,206.2 204.8 100.0 0
^LRollback Segment Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->A high value for "Pct Waits" suggests more rollback segments may be required
->RBS stats may not be accurate between begin and end snaps when using Auto Undo
managment, as RBS may be dynamically created and dropped as needed
Trans Table Pct Undo Bytes
RBS No Gets Waits Written Wraps Shrinks Extends
0 13.0 0.00 0 0 0 0
1 856.0 0.00 224,282 0 0 0
2 965.0 0.00 473,740 1 0 0
3 1,304.0 0.00 565,018 1 0 1
4 859.0 0.00 258,906 1 0 0
11 886.0 0.00 345,162 0 0 0
12 1,332.0 0.00 546,236 1 0 0
13 841.0 0.00 229,950 1 0 0
14 797.0 0.00 215,582 0 0 0
15 1,252.0 0.00 349,772 2 1 1
16 850.0 0.00 222,894 1 0 0
^LRollback Segment Storage for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->Optimal Size should be larger than Avg Active
RBS No Segment Size Avg Active Optimal Size Maximum Size
0 385,024 0 385,024
1 22,142,976 11,545,361 100,786,176
2 4,317,184 680,223 51,503,104
3 4,317,184 684,561 142,729,216
4 3,268,608 685,593 50,454,528
11 11,657,216 3,215,066 167,895,040
12 4,317,184 726,453 13,754,368
13 4,317,184 667,922 27,385,856
14 4,317,184 738,701 49,405,952
15 9,560,064 642,634 84,008,960
16 5,365,760 694,846 15,851,520
^LUndo Segment Summary for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> Undo segment block stats:
-> uS - unexpired Stolen, uR - unexpired Released, uU - unexpired reUsed
-> eS - expired Stolen, eR - expired Released, eU - expired reUsed
Undo Undo Num Max Qry Max Tx Snapshot Out of uS/uR/uU/
TS# Blocks Trans Len (s) Concurcy Too Old Space eS/eR/eU
13 754 8,780,184 149 1 0 0 0/0/0/0/0/0
Undo Segment Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> ordered by Time desc
Undo Num Max Qry Max Tx Snap Out of uS/uR/uU/
End Time Blocks Trans Len (s) Concy Too Old Space eS/eR/eU
12-Mar 15:38 166 ######## 68 1 0 0 0/0/0/0/0/0
12-Mar 15:28 204 ######## 3 1 0 0 0/0/0/0/0/0
12-Mar 15:18 214 ######## 3 1 0 0 0/0/0/0/0/0
12-Mar 15:08 170 ######## 149 1 0 0 0/0/0/0/0/0
^LLatch Activity for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
willing-to-wait latch get requests
->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
->"Pct Misses" for both should be very close to 0.0
Pct Avg Wait Pct
Get Get Slps Time NoWait NoWait
Latch Requests Miss /Miss (s) Requests Miss
Consistent RBA 3,899 0.0 0 0
FOB s.o list latch 113 0.0 0 0
SQL memory manager latch 4 0.0 0 790 0.0
SQL memory manager worka 66,516 0.0 0 0
active checkpoint queue 980 0.0 0 0
archive control 89 0.0 0 0
archive process latch 48 0.0 0 0
cache buffer handles 392 0.0 0 0
cache buffers chains 3,696,307 0.0 0.0 0 34,306 0.0
cache buffers lru chain 21,217 0.0 0.0 0 21,384 0.0
channel handle pool latc 106 0.0 0 0
channel operations paren 1,773 0.0 0 0
checkpoint queue latch 48,252 0.0 0 1,219 0.0
child cursor hash table 144,268 0.0 0.0 0 0
dml lock allocation 10,464 0.0 0 0
dummy allocation 724 0.0 0 0
enqueue hash chains 64,677 0.0 0.0 0 0
enqueues 77,340 0.0 0.2 0 0
event group latch 52 0.0 0 0
global tx hash mapping 21 0.0 0 0
hash table column usage 126 0.0 0 491,356 0.0
job workq parent latch 0 0 8 0.0
job_queue_processes para 43 0.0 0 0
kmcptab latch 79 0.0 0 0
kmcpvec latch 0 0 79 0.0
ktm global data 8 0.0 0 0
kwqit: protect wakeup ti 79 0.0 0 0
lgwr LWN SCN 4,217 0.0 0.0 0 0
library cache 1,798,405 0.3 0.0 0 47,204 0.9
library cache load lock 2,480 0.0 0 0
library cache pin 879,035 0.0 0.0 0 0
library cache pin alloca 603,279 0.0 0.0 0 0
list of block allocation 381 0.0 0 0
loader state object free 27,796 0.0 0 0
messages 18,381 0.0 0.0 0 0
mostly latch-free SCN 4,220 0.1 0.0 0 0
multiblock read objects 5,328 0.0 0 0
ncodef allocation latch 40 0.0 0 0
post/wait queue 5,523 0.0 0 3,587 0.0
process allocation 52 0.0 0 52 0.0
process group creation 106 0.0 0 0
redo allocation 37,748 0.0 0 0
redo copy 0 0 29,635 0.0
redo writing 14,340 0.0 0 0
row cache enqueue latch 11,874,838 0.0 0.0 0 0
row cache objects 11,876,412 0.0 0.0 0 81 0.0
sequence cache 1,113 0.0 0 0
session allocation 117,333 0.0 0.0 0 0
session idle bit 1,141,301 0.0 0.0 0 0
session switching 40 0.0 0 0
^LLatch Activity for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
willing-to-wait latch get requests
->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
->"Pct Misses" for both should be very close to 0.0
Pct Avg Wait Pct
Get Get Slps Time NoWait NoWait
Latch Requests Miss /Miss (s) Requests Miss
session timer 834 0.0 0 0
shared pool 1,804,311 0.2 0.1 1 0
sim partition latch 0 0 8 0.0
simulator hash latch 110,923 0.0 0 0
simulator lru latch 71 0.0 0 1,975 0.0
sort extent pool 48 0.0 0 0
spilled msgs queues list 79 0.0 0 0
transaction allocation 15,341 0.0 0 0
transaction branch alloc 61 0.0 0 0
undo global data 14,952 0.0 0 0
user lock 1,400 0.0 0 0
virtual circuit buffers 413,970 0.0 0.0 0 0
virtual circuit queues 187,775 0.0 0.0 0 0
virtual circuits 80,454 0.0 0 0
^LLatch Sleep breakdown for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> ordered by misses desc
Get Spin &
Latch Name Requests Misses Sleeps Sleeps 1->4
library cache 1,798,405 4,608 221 4390/215/3/0
/0
shared pool 1,804,311 3,662 477 3196/455/11/
0/0
enqueues 77,340 5 1 4/1/0/0/0
^LLatch Miss Sources for DB: XXXX Instance: XXXX Snaps: 4527 -4531
-> only latches with sleeps are shown
-> ordered by name, sleeps desc
NoWait Waiter
Latch Name Where Misses Sleeps Sleeps
enqueues ksqgel: create enqueue 0 1 1
library cache kgllkdl: child: cleanup 0 14 45
library cache kglupc: child 0 9 37
library cache kglic 0 7 4
library cache kglpin: child: heap proces 0 7 2
library cache kglhdgc: child: 0 5 10
library cache kglpndl: child: after proc 0 5 2
library cache kglobpn: child: 0 3 9
library cache kglpndl: child: before pro 0 3 9
library cache kgldti: 2child 0 2 0
library cache kglpnc: child 0 2 53
library cache kglhdgn: child: 0 1 30
shared pool kghalo 0 302 127
shared pool kghfrunp: alloc: wait 0 124 0
shared pool kghfrunp: clatch: nowait 0 89 0
shared pool kghfrunp: clatch: wait 0 74 10
shared pool kghupr1 0 47 339
shared pool kghalp 0 4 4
^LDictionary Cache Stats for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->"Pct Misses" should be very low (< 2% in most cases)
->"Cache Usage" is the number of cache entries being used
->"Pct SGA" is the ratio of usage to allocated size for that cache
Get Pct Scan Pct Mod Final
Cache Requests Miss Reqs Miss Reqs Usage
dc_histogram_defs 2,118,905 0.0 0 0 2,547
dc_object_ids 3,216,369 0.0 0 0 701
dc_objects 22,189 0.2 0 0 456
dc_profiles 349 0.0 0 0 1
dc_rollback_segments 350 0.0 0 0 22
dc_segments 505,804 0.0 0 0 1,085
dc_sequences 18 0.0 0 18 2
dc_tablespaces 30,016 0.0 0 0 12
dc_user_grants 969 0.0 0 0 22
dc_usernames 21,334 0.0 0 0 7
dc_users 19,245 0.0 0 0 23
Library Cache Activity for DB: XXXX Instance: XXXX Snaps: 4527 -4531
->"Pct Misses" should be very low
Get Pct Pin Pct Invali-
Namespace Requests Miss Requests Miss Reloads dations
BODY 64 0.0 64 0.0 0 0
CLUSTER 340 0.6 348 1.1 0 0
INDEX 237 0.0 237 0.0 0 0
SQL AREA 116,941 6.6 391,824 10.0 11,529 2
TABLE/PROCEDURE 47,075 0.2 108,992 1.0 732 0
TRIGGER 746 1.5 746 1.5 0 0
^LShared Pool Advisory for DB: XXXX Instance: XXXX End Snap: 4531
-> Note there is often a 1:Many correlation between a single logical object
in the Library Cache, and the physical number of memory objects associated
with it. Therefore comparing the number of Lib Cache objects (e.g. in
v$librarycache), with the number of Lib Cache Memory Objects is invalid
Estd
Shared Pool SP Estd Estd Estd Lib LC Time
Size for Size Lib Cache Lib Cache Cache Time Saved Estd Lib Cache
Estim (M) Factr Size (M) Mem Obj Saved (s) Factr Mem Obj Hits
352 .6 375 15,062 574,744 1.0 97,562,016
416 .7 439 17,218 576,603 1.0 97,833,828
480 .8 503 19,153 578,104 1.0 98,135,338
544 .9 566 21,093 579,653 1.0 98,617,796
608 1.0 619 22,788 581,195 1.0 99,127,166
672 1.1 681 30,538 583,092 1.0 99,741,869
736 1.2 735 34,290 587,030 1.0 100,967,607
800 1.3 798 38,022 594,101 1.0 103,269,753
864 1.4 858 42,002 602,185 1.0 106,482,793
928 1.5 922 44,110 606,329 1.0 108,314,799
992 1.6 985 48,321 608,336 1.0 109,245,477
1,056 1.7 1,049 50,582 609,325 1.0 109,697,087
1,120 1.8 1,113 53,649 610,059 1.0 110,009,531
1,184 1.9 1,177 60,950 610,680 1.1 110,251,066
1,248 2.1 1,248 65,824 611,135 1.1 110,424,882
^LSGA Memory Summary for DB: XXXX Instance: XXXX Snaps: 4527 -4531
SGA regions Size in Bytes
Database Buffers 318,767,104
Fixed Size 732,784
Redo Buffers 811,008
Variable Size 771,751,936
sum 1,092,062,832
SGA breakdown difference for DB: XXXX Instance: XXXX Snaps: 4527 -4531
Pool Name Begin value End value % Diff
java free memory 33,554,432 33,554,432 0.00
large free memory 64,089,912 63,913,256 -0.28
large session heap 3,018,952 3,195,608 5.85
shared 1M buffer 2,098,176 2,098,176 0.00
shared Checkpoint queue 513,280 513,280 0.00
shared FileOpenBlock 1,191,104 1,191,104 0.00
shared KGK heap 7,000 7,000 0.00
shared KGLS heap 2,993,944 3,009,616 0.52
shared KQR L PO 1,312,072 1,322,312 0.78
shared KQR L SO 156,688 156,688 0.00
shared KQR M PO 2,065,256 2,065,256 0.00
shared KQR M SO 86,616 86,616 0.00
shared KQR S SO 8,216 8,216 0.00
shared KQR X PO 2,576 2,576 0.00
shared KSXR pending messages que 853,952 853,952 0.00
shared KSXR receive buffers 1,034,000 1,034,000 0.00
shared MTTR advisory 74,672 74,672 0.00
shared PL/SQL DIANA 616,680 616,880 0.03
shared PL/SQL MPCODE 764,312 611,264 -20.02
shared PLS non-lib hp 2,088 2,088 0.00
shared PX subheap 24,336 24,336 0.00
shared XDB Schema Cac 5,927,720 5,927,720 0.00
shared dictionary cache 3,229,952 3,229,952 0.00
shared errors 384 384 0.00
shared event statistics per sess 1,923,040 1,923,040 0.00
shared fixed allocation callback 472 472 0.00
shared free memory 17,476,144 15,506,552 -11.27
shared joxs heap init 4,240 4,240 0.00
shared library cache 68,887,280 65,624,984 -4.74
shared message pool freequeue 771,984 771,984 0.00
shared miscellaneous 49,162,528 49,205,880 0.09
shared parameters 55,784 35,760 -35.90
shared sim memory hea 328,304 328,304 0.00
shared sql area 509,408,184 514,745,136 1.05
shared subheap 100,040 100,040 0.00
shared table definiti 5,104 3,648 -28.53
shared trigger defini 544 544 0.00
shared trigger inform 1,800 1,800 0.00
shared trigger source 168 168 0.00
buffer_cache 318,767,104 318,767,104 0.00
fixed_sga 732,784 732,784 0.00
log_buffer 787,456 787,456 0.00
^Linit.ora Parameters for DB: XXXX Instance: XXXX Snaps: 4527 -4531
End value
Parameter Name Begin value (if different)
aq_tm_processes 1
background_dump_dest /opt/oracle/admin/XXXX/bdump
compatible 9.2.0.0.0
control_files /opt/u01/oradata/XXXX/ctl/cont
core_dump_dest /opt/oracle/admin/XXXX/cdump
db_block_size 8192
db_cache_size 318767104
db_domain
db_file_multiblock_read_count 8
db_name XXXX
dispatchers (PROTOCOL=TCP)
fast_start_mttr_target 160
hash_join_enabled TRUE
instance_name XXXX
java_pool_size 33554432
job_queue_processes 10
large_pool_size 67108864
log_archive_start TRUE
open_cursors 300
oracle_trace_enable TRUE
pga_aggregate_target 256901120
processes 150
query_rewrite_enabled FALSE
remote_login_passwordfile EXCLUSIVE
shared_pool_size 637534208
sort_area_size 524288
star_transformation_enabled FALSE
timed_statistics TRUE
trace_enabled FALSE
undo_management AUTO
undo_retention 10800
undo_tablespace UNDOTBLSPCE
user_dump_dest /opt/oracle/admin/XXXX/udump
End of Report
Message was edited by:
pinjamStart from low hang fruite.
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
log file parallel write 7,798 0 138 18 2.4
db file parallel write 193 0 29 153 0.1
control file parallel write 790 0 21 27 0.2
process startup 2 0 0 35 0.0
control file sequential read 556 0 0 0 0.2
rdbms ipc reply 3 0 0 1 0.0
latch free 2 0 0 0 0.0
rdbms ipc message 6,444 2,366 13,269 2059 2.0
smon timer 8 8 2,344 ###### 0.0
pmon timer 834 834 2,339 2804 0.3
-------------------------------------------------------------Since you have numours logfile and control file related top wait events. Consider move them to a fast disk or seperate them from other datafiles if you haven't done so.
Also there's part of your statspack missing, like Top SQL
Maybe you are looking for
-
I'm in need ot a portable way to listen to podcasts and type some notes. Due to low vision I cannot use an ipod or iphone. I have an imac at home. Does the ipad come with itunes preinstalled, or would I haave to buy it separately. I know I'd have
-
Hi, For FI documents generated from GR (MIGO) and IV (MIRO), can we update the text field with certain values from the material documents? In fact, we would like to always populate the text field of FI documents from sub modules. What would be the be
-
Nokia N8 user with PR 1.2 Hi all! I have a serious problem with my orange Nokia N8. I went to the beach for some time and phone was inside of the beach bag which had no direct contact with sun light exposure. There is 0.02 mm screen protector which
-
How can I add the purchased additional iCloud storge to my iCloud account?
-
I need to rotate a video that I took, but I don't know how.
I took a video, but when I imported it onto my computer it is upside-down. Is it possible to rotate it?