The DBQL tables are created in database DBC by the DIP utility during installation. For details, see “Database Initialization Program (DIP)” in Teradata Vantage™ - Database Utilities , B035-1102 . The tables are empty until you run a BEGIN QUERY LOGGING or REPLACE QUERY LOGGING request with the required option, as shown in the following table.
Dictionary Table | Purpose | Method Used To Populate |
---|---|---|
DBQLExplainTbl | Contains the explain information in an unformatted string without line breaks. | The EXPLAIN option. |
DBQLogTbl | Is the main table containing information about queries being logged. | A BEGIN QUERY LOGGING or REPLACE QUERY LOGGING request. No option is required. |
DBQLObjTbl | Stores information on the target objects of the query being logged. One row is logged for each object referenced by the query. | The OBJECT option. |
DBQLParamTbl | Logs the parameter variable name, type, position, and value for each parameter in a parameterized request. This table contains confidential user information and should only be accessed by personnel trusted with the DBC password. | The PARAMINFO option. |
DBQLRuleCountTbl | Stores the cardinality of DBQLRuleTbl (for internal use only). | A BEGIN QUERY LOGGING request. |
DBQLRuleTbl | Stores the rules resulting from each BEGIN QUERY LOGGING or REPLACE QUERY statement. One row exists for each set of username, account string, and application name specified in the BEGIN QUERY LOGGING and REPLACE QUERY LOGGING statements. The END QUERY LOGGING statement removes rows from the rule table. This table is for internal use only. |
A BEGIN QUERY LOGGING or REPLACE QUERY LOGGING request. |
DBQLSQLTbl | Stores the full SQL text of the query. One query string may require more than one row. | The WITH SQL option. If a Teradata Dynamic Workload Management software exception occurs, the Teradata Dynamic Workload Management software causes rows to be written to the DBQLSQLTbl.
|
DBQLStepTbl | Stores information about each processing step used to satisfy the query. One row is logged for each step, including parallel steps. | The WITH STEPINFO option. |
DBQLSummaryTbl | Stores information about queries that meet the criteria for a rule specifying the LIMIT SUMMARY or LIMIT THRESHOLD option. | The LIMIT SUMMARY or LIMIT THRESHOLD option. |
DBQLUtilityTbl | Each row stores information about one completed load/export or Data Stream Architecture job. | The WITH UTILITYINFO option. |
DBQLXMLLockTbl | Logs lock delays from the Lock Manager in the AMPs in XML format. | The WITH LOCK option. |
DBQLXMLTbl | Stores the query plan for all DML statements and statistics usage information in an XML document. | The WITH XMLPLAN option or the WITH [DETAILED] STATSUSAGE option. You can also specify these options together. |