Scenarios of Detailed Logging
IF you… |
THEN … |
Objects |
|
define a rule for a user specifying WITH OBJECTS |
if the user runs a SELECT that joins two tables owned by the same database: |
define a rule with WITH OBJECTS and the user runs a query that causes the Optimizer to reference the same object twice |
|
SQL |
|
begin query logging with no options for a user, and that user subsequently logs on and runs a query |
a default row is logged for that user in DBQLogTbl with 200 characters of the SQL. |
begin logging for a user with no options and the user runs a query with more than 200 characters |
a row is logged in DBQLogTbl that includes the first 200 characters of the query. |
create a rule for a user that specifies LIMIT SQLTEXT= 0 and the user runs a query |
logging depends on the following: |
define a rule specifying LIMIT SQLTEXT=10000 and the user runs a query containing 15000 characters |
a row is logged in DBQLogTbl that includes the first 10,000 SQL characters. |
create a rule specifying LIMIT SQLTEXT=32000 (or anything larger than 10,000) and the user runs a query comprising >31000 SQL characters |
a row is logged in DBQLogTbl that includes the first 10,000 SQL characters. |
define a rule with just the WITH SQL option |
The first 200 characters of the SQL statement are logged in DBQLogTbl and the entire statement is logged in as many rows as required in DBQLSQLTbl. |
define a rule with both the WITH SQL option and LIMIT SQLTEXT=1000 |
The first 1,000 characters of the SQL statement are logged in DBQLogTbl and the entire statement is logged in as many rows as required in DBQLSQLTbl. |
define a rule with the WITH SQL option and LIMIT SQLTEXT=0 |
None of the SQL characters are saved in DBQLogTbl. The entire statement is logged in as many rows as required in DBQLSQLTbl. |
Steps |
|
define a rule with WITH STEPINFO and the user runs a query that does not generate parallel steps |
One row is logged in DBQLStepTbl for each step used to resolve the query. In each row, the value of StepLev2Num is 0. |
define a rule with WITH STEPINFO and the user runs a query that generates parallel steps |
One row is logged in DBQLStepTbl for each step used to resolve the query and each parallel step is differentiated by the step level number in StepLev2Num. |