The DBMS_HEAT_MAP
package provides an interface to externalize heatmaps at various levels of storage including block, extent, segment, object and tablespace. A second set of subprograms externalize the heatmaps materialized by the background for top N tablespaces.
See Also:
Heat Map in Oracle Database VLDB and Partitioning Guide
This chapter contains the following topics:
Overview
Security Model
To implement your ILM strategy, you can use Heat Map in Oracle Database to track data access and modification. You can also use Automatic Data Optimization (ADO) to automate the compression and movement of data between different tiers of storage within the database.
The Heat Map tracks modification times at the block level, and multiple access statistics at the segment level. Objects in the SYSTEM
and SYSAUX
tablespaces are not tracked. DBMS_HEAT_MAP
gives you access to the Heat Map statistics at various levels - block, extent, segment, object, and tablespace.
Table 74-1 DBMS_HEAT_MAP Package Subprograms
Subprogram | Description |
---|---|
Returns last modification time for each block in a table segment |
|
Returns the extent level Heat Map statistics for a table segment |
|
Returns the minimum, maximum and average access times for all the segments belonging to the object |
|
Returns the heatmap attributes for the given segment |
|
Returns the minimum, maximum and average access times for all the segments in the tablespace |
This table function returns the last modification time for each block in a table segment. It returns no information for segment types that are not data.
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;
Table 74-2 BLOCK_HEAT_MAP Function Parameters
Parameter | Description |
---|---|
|
Owner of the segment |
|
Table name of a non-partitioned table or (sub)partition of partitioned table. Returns no rows when table name is specified for a partitioned table. |
|
Defaults to |
|
ID of the column on which to sort the output. Valid values 1..9. Invalid values are ignored. |
|
Defaults to |
Table 74-3 BLOCK_HEAT_MAP Function Return Values (Output Parameters)
Parameter | Description |
---|---|
|
Owner of the segment |
|
Segment name of the non-partitioned table |
|
Partition or subpartition name |
|
Tablespace containing the segment |
|
Absolute file number of the block in the segment |
|
Relative file number of the block in the segment |
|
Block number of the block |
|
Last modification time of the block |
This table function returns the extent level Heat Map 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 included.
DBMS_HEAT_MAP.EXTENT_HEAT_MAP ( owner IN VARCHAR2, segment_name IN VARCHAR2, partition_name IN VARCHAR2 DEFAULT NULL, RETURN hm_els_row PIPELINED;
Table 74-4 EXTENT_HEAT_MAP Function Parameters
Parameter | Description |
---|---|
|
Owner of the segment |
|
Table name of a non-partitioned table or (sub)partition of partitioned table. Returns no rows when table name is specified for a partitioned table. |
|
Defaults to |
Table 74-5 EXTENT_HEAT_MAP Function Return Values (Output Parameters)
Parameter | Description |
---|---|
|
Owner of the segment |
|
Segment name of the non-partitioned table |
|
Partition or subpartition name |
|
Tablespace containing the segment |
|
Absolute file number of the block in the segment |
|
Relative file number of the block in the segment |
|
Block number of the block |
|
Number of blocks in the extent |
|
Number of bytes in the extent |
|
Minimum of last modification time of the block |
|
Maximum of last modification time of the block |
|
Average of last modification time of the block |
This table function returns the minimum, maximum and average access times for all the segments belonging to the object. The object must be a table. The table function raises an error if called on object tables other than table.
DBMS_HEAT_MAP.OBJECT_HEAT_MAP ( object_owner IN VARCHAR2, object_name IN VARCHAR2) RETURN hm_object_table PIPELINED;
Table 74-7 OBJECT_HEAT_MAP Function Return Values (Output Parameters)
Parameter | Description |
---|---|
|
Name of the top level segment |
|
Name of the partition |
|
Name of the tablespace |
|
Type of segment as in |
|
Segment size in bytes |
|
Oldest write time for the segment |
|
Latest write time for the segment |
|
Average write time for the segment |
|
Oldest read time for the segment |
|
Latest read time for the segment |
|
Average write time for the segment |
|
Oldest index lookup time for the segment |
|
Latest index lookup time for the segment |
|
Average index lookup time for the segment |
|
Oldest full table scan time for the segment |
|
Latest full table scan time for the segment |
|
Average full table scan time for the segment |
This procedure returns the heatmap attributes for the given 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_lookuptime OUT DATE, max_lookuptime OUT DATE, avg_lookuptime OUT DATE, min_ftstime OUT DATE, max_ftstime OUT DATE, avg_ftstime OUT DATE);
Table 74-9 SEGMENT_HEAT_MAP Procedure Return Values (Output Parameters)
Parameter | Description |
---|---|
|
Oldest write time for the segment |
|
Latest write time for the segment |
|
Average write time for the segment |
|
Oldest read time for the segment |
|
Latest read time for the segment |
|
Average write time for the segment |
|
Oldest index lookup time for the segment |
|
Latest index lookup time for the segment |
|
Average index lookup time for the segment |
|
Oldest full table scan time for the segment |
|
Latest full table scan time for the segment |
|
Average full table scan time for the segment |
This table function returns the minimum, maximum and average access times for all the segments in the tablespace.
DBMS_HEAT_MAP.TABLESPACE_HEAT_MAP ( tablespace_name IN VARCHAR2) RETURN hm_tablespace_table PIPELINED;
Table 74-11 TABLESPACE_HEAT_MAP Procedure Return Values (Output Parameters)
Parameter | Description |
---|---|
|
Total number of segments in the tablespace |
|
Space used by the segments in the tablespace |
|
Oldest write time for the segment |
|
Latest write time for the segment |
|
Average write time for the segment |
|
Oldest read time for the segment |
|
Latest read time for the segment |
|
Average write time for the segment |
|
Oldest index lookup time for the segment |
|
Latest index lookup time for the segment |
|
Average index lookup time for the segment |
|
Oldest full table scan time for the segment |
|
Latest full table scan time for the segment |
|
Average full table scan time for the segment |