| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> help:statspace's stats$sql_summary
In statspack's stats$sql_summary, it has almost everything except
parse_user_id which v$sqlarea has. Without parse_user_id, the sql statement
is not useful, when you try to explain plan it, you will always get error
that "table or view not available".
Say a statement: select * from test.
if several schema have table test, what are you going to do?
Look into perfstat.snapshot package, I found that stats$sql_summary is
populated as follows,
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
, address
, hash_value
, version_count
)
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
, address
, hash_value
, version_count
from v$sqlxs
where 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
;
Thanks for your help. Received on Mon Mar 25 2002 - 19:13:30 CST
![]() |
![]() |