With the WITH OBJECTS option, DBQL logs one row in DBQLObjTbl and the associated view, QryLogObjectsV, for each data object referenced by the query. An object can be a database, data table, column, secondary index, join index, or journal table. (If the object is a secondary index, its number is logged rather than a name.) DBQL gets the use counts from the Optimizer and not the SQL statement itself. The system logs a count of the number of times the Optimizer accessed the object. If objects are requested, object information is stored in a DBQL table that contains a row for each object used in the query.
If objects are requested, object information is stored in a DBQL table that contains a row for each object used in the query.
|IF the object is …||THEN|
|an index||the field ID is logged instead of a name.|
Object frequency can also be logged. This is the number of times an object is used in a query.
Possible Values for ObjectType
|Agg||User-defined aggregate function|
|AgS||User-defined aggregate STAT function|
|Idx||Index. For each index, there is a database name, table name, and column name. The ObjectId column is the identifier of the table and the ObjectNum column is the number of the index in that table. For multi-column indexes, there is one row for each column of the index that a query used. For example, if an index consists of three columns and the query uses all three, there will be three rows, each with a different column name. The column name will be null for an index for statements such as COLLECT STATISTICS, ALTER PROCEDURE, SHOW PROCEDURE, or SELECT COUNT(*).|
|JIx||Join index. For each join index, there is a database name and join index name in the ObjectTableName field. For these rows, the ColumnName indicates a column referred to by the join index.
|NoT||No type (unknown)|
|Sta||User-defined STAT function|
|XSP||External stored procedure|
Possible Values for TypeOfUse
|1||Found in the resolver|
|2||Accessed during query processing|
|4||Found in a conditional text|
|7||Reference, access, conditional|
|8||Found in inner join condition|
|10||Access, inner join|
|14||Access, conditional, inner join|
|16||Found in outer join condition|
|18||Access, outer join|
|22||Access, conditional, outer join|
|30||Access, conditional, inner and outer join|
|32||Found in sum node|
|38||Access, conditional, sum|
|46||Access, conditional, sum, inner join|
|54||Access, conditional, sum, outer join|
|64||Found in a full outer join condition|
|70||Access, conditional, full outer join|
|102||Access, conditional, sum, full outer join|