MON_GET_TABLE_USAGE_LIST table function - Returns information from a table usage list
The MON_GET_TABLE_USAGE_LIST table function returns information from a usage list defined for a table.
Authorization
- EXECUTE privilege on the routine
- DATAACCESS authority
- DBADM authority
- SQLADM authority
Default PUBLIC privilege
None
Syntax
The schema is SYSPROC.
Routine parameters
- usagelistschema
- An input argument of type VARCHAR(128) that specifies a valid schema name in the currently connected database when calling this function. If the argument is null or an empty string, usage lists are retrieved in all schemas in the database. If the argument is specified, usage lists are only returned for the specified schema.
- usagelistname
- An input argument of type VARCHAR(128) that specifies a usage list defined for a table that resides in the currently connected database when calling this function. If usagelistname is null or an empty string, then all usage lists defined for a table from the schemas identified by the usagelistschema that exist are retrieved. If specified, only the usage list specified from the schemas identified by the usagelistschema is returned.
- member
- An input argument of type INTEGER that specifies a valid member in the same instance as the currently connected database when calling this function. Specify -1 for the current database member, or -2 for all active database members. If the NULL value is specified, -1 is set implicitly.
Information returned
Usage notes
Each row returned by this function represents the total number of times (num_references) a unique section (DML statement only, executable ID) has referenced a particular object during a particular time interval (monitor interval ID) since being added to the list. The statistics collected for this row represents the total aggregated value across these executions during this time interval.
Use the num_ref_with_metrics column instead of the num_references column when computing averages, since the num_references column counts all executions of the section, regardless of whether or not the execution of the section contributed to the metrics that are reported.
Metrics collected by this function are controlled at the database level using the mon_obj_metrics configuration parameter. By default, metrics collection is enabled.
Example
Retrieve the usage list USL_MON_PAYROLL from member 3
SELECT * FROM TABLE(
MON_GET_TABLE_USAGE_LIST(NULL, 'USL_MON_PAYROLL', 3))
USAGELISTSCHEMA USAGELISTNAME TABSCHEMA TABNAME
--------------- --------------- --------- -------
ISAYYID USL_MON_PAYROLL ISAYYID T1
ISAYYID USL_MON_PAYROLL ISAYYID T1
MEMBER . . . LAST_UPDATED . . .
------ . . . -------------------------- . . .
3 . . . 2011-07-06-10.20.22.727803 . . .
3 . . . 2011-07-06-10.20.58.202161 . . .
2 record(s) selected.