ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
This package provides heatmap information at block/extent/segment object and tablespace levels. It contains the definitions for processing heatmap for top N objects and tablespaces.
The execution privilege is granted to PUBLIC. Procedures in this package run under the caller security. The user must have ANALYZE privilege on the object.
AUTHID
CURRENT_USER
Data Types
TYPE hm_bls_record IS RECORD (
owner VARCHAR2(128),
segment_name VARCHAR2(128),
partition_name VARCHAR2(128),
tablespace_name VARCHAR2(30),
file_id NUMBER,
relative_fno NUMBER,
block_id NUMBER,
writetime DATE);
TYPE hm_bls_row IS TABLE OF hm_bls_record;
TYPE hm_bls_tabidx IS TABLE OF hm_bls_record INDEX BY PLS_INTEGER;
TYPE hm_els_record IS RECORD (
owner VARCHAR2(128),
segment_name VARCHAR2(128),
partition_name VARCHAR2(128),
tablespace_name VARCHAR2(30),
file_id NUMBER,
relative_fno NUMBER,
block_id NUMBER,
blocks NUMBER,
bytes NUMBER,
min_writetime DATE,
max_writetime DATE,
avg_writetime DATE);
TYPE hm_els_row IS TABLE OF hm_els_record;
TYPE hm_els_tabidx IS TABLE OF hm_els_record INDEX BY PLS_INTEGER;
Returns the block level ILM statistics for a table segment. It returns no information for segment types that are not data. The stat returned today is the latest modification time of the block.
dbms_heat_map.block_heat_map(
owner IN VARCHAR2,
segment_name IN VARCHAR2,
partition_name IN VARCHAR2 DEFAULT NULL,
sort_columnid IN NUMBER DEFAULT NULL,
sort_order IN VARCHAR2 DEFAULT NULL)
RETURN hm_bls_row PIPELINED;
SELECT * FROM TABLE(dbms_heat_map.block_heat_map('SYS', 'OBJ$'));
SELECT relative_fno, block_id
FROM TABLE(dbms_heat_map.block_heat_map('SYS', 'OBJ$'));
Returns the extent level ILM statistics for a table segment. It returns no information for segment types that are not data. Aggregates at extent level including minimum modification time and maximum modification time are returned.
dbms_heat_map.extent_heat_map(
owner IN VARCHAR2,
segment_name IN VARCHAR2,
partition_name IN VARCHAR2 DEFAULT NULL)
RETURN hm_els_row PIPELINED;
SELECT * FROM TABLE(dbms_heat_map.extent_heat_map('SYS', 'SOURCE$'));
SELECT relative_fno, block_id, blocks, bytes
FROM TABLE(dbms_heat_map.extent_heat_map('SYS', 'SOURCE$'));
Returns the heatmap attributes for a named segment
dbms_heat_map.segment_heat_map(
tablespace_id IN NUMBER,
header_file IN NUMBER,
header_block IN NUMBER,
segment_objd IN NUMBER,
min_writetime OUT DATE,
max_writetime OUT DATE,
avg_writetime OUT DATE,
min_readtime OUT DATE,
max_readtime OUT DATE,
avg_readtime OUT DATE,
min_ftstime OUT DATE,
max_ftstime OUT DATE,
avg_ftstime OUT DATE,
min_lookuptime OUT DATE,
max_lookuptime OUT DATE,
avg_lookuptime OUT DATE);
conn / as sysdba
SELECT tablespace_name, header_file, header_block
FROM dba_segments
WHERE segment_name = 'SOURCE$';
SELECT ts#
FROM ts$
WHERE name = 'SYSTEM';
SELECT data_object_id
FROM dba_objects
WHERE object_name = 'SOURCE$';