Enterprise Manager 10g to 12c - Tablespace Data Query shows as Top SQL and Runs Slow (Doc ID 1327378.1)

Last updated on MARCH 08, 2017

Applies to:

Enterprise Manager for Oracle Database - Version 10.2.0.5 and later
Information in this document applies to any platform.

Symptoms

This database instance performance problem may be experienced when using Enterprise Manager DB Control, Grid Control or Cloud Control.
This is a database problem and not a Enterprise Manager problem. It can be seen outside Enterprise Manager.
The SQL completes however it runs slow, and shows as 'Top SQL'.
Any TableSpace-related SQL query completes, but is very slow and belongs to the "TopSQL".

The following SQL from OEM shows as the 'Top SQL' on the Database Target:

/* OracleOEM */
SELECT dtp.tablespace_name "TABLESPACE_NAME", dtp.status "STATUS", dtp.contents "CONTENTS", dtp.extent_management "EXTENT MANAGEMENT", dtp.allocation_type "ALLOCATION TYPE", dtp.logging "LOGGING", NVL(ts.bytes, 0) "SIZE (M)", dtp.initial_extent "INITIAL EXT SIZE (K)", dtp.next_extent "Next Extent", dtp.pct_increase "INCREMENT PCT", dtp.max_extents "MAX EXTENTS", NVL(ts.bytes - NVL(f.bytes,0),0) "USED BYTES", dtp.min_extents, dtp.min_extlen, dtp.segment_space_management "SEGMENT SPACE MANAGEMENT", dtp.block_size, dtp.bigfile
FROM sys.dba_tablespaces dtp,
(SELECT tablespace_name, sum(bytes) bytes
FROM dba_data_files GROUP BY tablespace_name) ts,
(SELECT tablespace_name,sum(bytes) bytes
from dba_free_space GROUP BY tablespace_name) f
WHERE dtp.tablespace_name = ts.tablespace_name (+) AND dtp.tablespace_name = f.tablespace_name (+) AND NOT (dtp.extent_management LIKE 'LOCAL' AND dtp.contents LIKE 'TEMPORARY') UNION ALL
SELECT dtp.tablespace_name "TABLESPACE_NAME", dtp.status "STATUS", dtp.contents "CONTENTS", dtp.extent_management "EXTENT MANAGEMENT", dtp.allocation_type "ALLOCATION TYPE", dtp.logging "LOGGING", NVL(a.bytes, 0) "SIZE (M)", dtp.initial_extent "INITIAL EXT SIZE (K)", dtp.next_extent "Next Extent", dtp.pct_increase "INCREMENT PCT", dtp.max_extents "MAX EXTENTS", NVL(t.bytes,0) "USED BYTES", dtp.min_extents, dtp.min_extlen, dtp.segment_space_management "SEGMENT SPACE MANAGEMENT", dtp.block_size, dtp.bigfile
FROM sys.dba_tablespaces dtp,
(SELECT tablespace_name, sum(bytes) bytes
FROM dba_temp_files GROUP BY tablespace_name) a,
(select ss.tablespace_name , sum((ss.used_blocks*ts.blocksize)) bytes
from gv$sort_segment ss, sys.ts$ ts
where ss.tablespace_name = ts.name group by ss.tablespace_name) t
WHERE dtp.tablespace_name = a.tablespace_name (+) AND dtp.tablespace_name = t.tablespace_name (+) AND dtp.extent_management LIKE 'LOCAL' AND dtp.contents LIKE 'TEMPORARY'

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms