Previous Topic: Progress Logging and Error ReportingNext Topic: Types


Package Customization

Important! This section contains advanced customization information. But for most installations, this will not be necessary.

As noted earlier, wgn_stats_cust is the mechanism that allows wgn_stats to be customized to meet specific customer requirements. To do this without requiring modifications to wgn_stats itself, the customizable interfaces are defined in the package specification for wgn_stats_cust, which is installed without a corresponding package body.

When statistics are gathered, wgn_stats attempts to execute any appropriate customized methods defined in wgn_stats_cust. If the customized method has been implemented (via the package body) then it gets executed; if it has not, wgn_stats executes the default implementation contained in wgn_stats.

The customizable interfaces are described on Type: WGN_STATS_PARAM_TAB section. First, it is important to know what can be customized. These customizations fall into three categories:

  1. Simple customization, allowing the default sampling percentages to be customized on a per process basis.
  2. Allow a user-defined procedure to be defined that can be called to do an arbitrary operation as the last step performed by wgn_stats.gather_all_stats.
  3. Allow individual and specific customization of the method used to gather statistics at the granularity of a specific table or index, at either a global or partition level.

Of the three types, the first two are self-explanatory; the third requires more detail. To provide the ability to customize statistics gathering at the object level, we need a way to encapsulate this information so it can be created and returned to wgn_stats in a well-defined form. This is done through two user-defined types:

These user-defined types are described in the next section.

This section contains the following topics:

Types

Methods