Skip to content

Commit

Permalink
Update Statspack SQLs to match AWR (#475)
Browse files Browse the repository at this point in the history
- remove statspack columns not in AWR
- add ApWaitTotal to Statspack
- add min and max snapshot time
  • Loading branch information
misolt authored Jul 18, 2024
1 parent fe1e3c5 commit 2ba1d13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ SELECT
avg(A.cluster_wait_time) "AvgClWait",
avg(A.application_wait_time) "AvgApWait",
avg(A.concurrency_wait_time) "AvgCcWait",
avg(A.plsql_exec_time) "AvgPlsExecTime",
avg(A.direct_writes) "AvgDirectWrites",
avg(A.disk_reads) "AvgDiskReads",
avg(A.end_of_fetch_count) "AvgFetchCount",
avg(A.java_exec_time) "AvgJavaExecTime",
avg(A.px_servers_executions) "AvgPxExecutions"
avg(A.plsql_exec_time) "AvgPlsExecTime"
FROM stats$sql_summary A
LEFT JOIN audit_actions B ON A.command_type = B.action
INNER JOIN stats$snapshot C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ SELECT
A.instance_number "InstanceNumber",
to_char(B.force_matching_signature) "ForceMatchingSignature",
min(B.sql_id) "SqlId",
min(A.snap_time) "MinBeginTime",
max(A.snap_time) "MaxEndTime",
sum(B.application_wait_time) "ApWaitTotal",
sum(B.buffer_gets) "BufferGetsTotal",
sum(B.cluster_wait_time) "ClWaitTotal",
sum(B.cpu_time) "CpuTimeTotal",
Expand Down

0 comments on commit 2ba1d13

Please sign in to comment.