Segment size collector (large segments — detail)


Job details

Name: Segment size collector (large segments — detail)
Platform: Oracle
Category: Capacity
Description: Collects size and extent number info for larger segments in the database.
Long description: Task collects information (size and extent number) for the largest segments in the database.
Version: 2.0
Default schedule: 55 6,17 1,5 *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’]

Parameters

Name Default value Description
large segm# histr 10 Number of segments collected in history tables.

Job Summary

SELECT owner, segment_name, segment_type, tablespace_name, extents, bytes FROM dba_segments ORDER BY bytes DESC;

Detailed Implementation
The “Segment size collector (large segments — detail)” job involves several SQL and PL/SQL operations managed through dbWatch Control Center. These include:

Tables and Views Creation

  1. Creating tables to hold historical and current largest segment data:
    • DBW_LARGE_SEGM – stores current snapshot of largest segments.
    • DBW_LARGE_SEGM_HISTR – stores historical data on large segments for trend analysis.
  1. Creating views for easier access and reporting on segment data:
    • dbv_large_segm – view to simplify querying current large segment data.
    • dbv_large_segm_histr – view to handle data concerning historical trends in segment growth.

Procedural Implementation

  1. A PL/SQL procedure “segment_size_detail” is central to this job, which:
    • Compiles a list of large segments from DBA_SEGMENTS depending on specified criteria such as ‘CLUSTER’, ‘INDEX’, etc.
    • Updates the DBW_LARGE_SEGM and DBW_LARGE_SEGM_HISTR tables with the latest segment data and historical tracking.
    • Handles changes in segment metadata such as size, type, and extent alterations.
    • Is responsible for managing executions based on the number of significant segments to track, which is configurable.

Dependencies and Execution

  1. This task depends on:
    • Self-referential dependency to maintain execution integrity.
    • Access to specific system and dictionary views, requiring appropriate privileges.
    • Table and view dependencies for data storage and manipulation.
  1. Automatic execution is configured to run at specified intervals using the `default-schedule` parameter ensuring regular updates.

Reporting and Analysis