Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 165 166 167 168 169 170 < 171 > 172 173 174 175 176 177 .. 218 >> Next


- One row for each table

- One row for each selected column

One row for the object is logged in DBQLObjTbl

The value in the FreqofUse field is incremented to 2.

no SQL characters are logged.

a row is logged in DBQLogTbl that includes the first 200 characters of the query.

logging depends on the following:

IF you . THEN .
also specified the [WITH] ALL or SQL option the SQL text is logged only in DBQSQLTbl.

14 - 24

Teradata RDBMS Database Administration 14 - 23 Chapter 14: Tracking Processing Behavior with the Database Query Log (DBQL)

Logging Scenarios

IF

THEN

did not also no SQL
specify WITH characters are
ALL or SQL logged.

you define a rule specifying 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.
you create a rule specifying 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 characters.
define a rule 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 just the 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 SQL option and 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 SQL option and SQLTEXT=0 None of the SQL characters are saved in DBQLogTbl. The entire statement is logged in as many rows as required in DBQLSQLTbl.
you create rules for a user and specify SUMMARY=5,10,15 and during the user's next session every query takes longer then 5 seconds but less than 10 seconds to complete all queries fall into the second time interval (5 to 10 seconds), so the second group is the only query count logged for the session in DBQLSummaryTbl
you create rules for a user and specify SUMMARY = 5,10,15 and during the user's next session every query completes in less than 5 seconds all queries fall into the first time interval (up to 5 seconds), so the first group is the only query count logged for the session in DBQLSummaryTbl
you create rules and specify SUMMARY=1,15,10 the statement is accepted (no checking is performed on SUMMARY input values) but the results will be odd

Teradata RDBMS Database Administration

14 - 23 Chapter 14: Tracking Processing Behavior with the Database Query Log (DBQL)

Logging Scenarios

IF . THEN .
you create rules for UserA and specify the statement is accepted and the default
THRESHOLD only (without a time value of 5 seconds is assigned. For
value), and UserA then processes four UserA's next session:
queries, where: The longer query is logged fully in
One query takes more than 5 DBQLogTbl, with values in all valid
seconds to complete fields of the row
Three queries complete in less than 5 For each of the three shorter queries:
seconds - No entries are made in DBQLogTbl
- DBQLSummaryTbl will have a row
with these values:
COUNT = 3
SECONDS = 10
LOWHIST = 5
HIGHHIST = 0
create a rule and specify An error is returned; THRESHOLD must
THRESHOLD=100000 be less than 32K.

14 - 26

Teradata RDBMS Database Administration 14 - 23 Chapter 14: Tracking Processing Behavior with the Database Query Log (DBQL)

Logging Implementation and Validation

Query Data Storage and Protection

When query logging is invoked, query data is stored in multiple DBQL cache segments. If a user has query logging rules for a session, data is collected for each query that runs under that session. Collected data is retained in cache until a log row is committed.

Depending on the rules, a log row is committed and the cache is flushed when:

An END QUERY LOGGING statement is received for a user who is currently logged on. The data may be incomplete. (For considerations when you need to change the rules of more than 100 users at a time, see "Dynamically Enable/Disable Logging" on page 14-19.)

The cache is 80% full

A 10-minute interval elapses (for the SUMMARY option) and data is in the cache

Because of its nature, there is no recovery mechanism for the cache in which DBQL row values are collected. Should a Teradata restart occur, any rows in cache that have not been sent to the AMPs will be lost.

However, query logging is not aborted as a result of a restart; DBQL uses the contents of DBQLRuleTbl to continue logging.

Protection for a Committed Row

DBQL tables occupy permanent space in database DBC. This means that once a row has been sent to an AMP, its insertion into a DBQL log is safeguarded through the Teradata RDBMS transaction and recovery journaling process. (For more information, see "Startup and Recovery" on page 9-8.)
Previous << 1 .. 165 166 167 168 169 170 < 171 > 172 173 174 175 176 177 .. 218 >> Next