|
|
Archives of the TeradataForum
Message Posted: Wed, 10 Nov 2010 @ 07:43:43 GMT
Subj: | | Re: 3rd-party application queries logged twice in DBQL table |
|
From: | | Barrineau, Claybourne |
Abhishek Jadhav wrote:
| The duplicate entries are because of the change in dbql logging which was introduced via DR127236; Applications generate SQLPrepare
function followed by SQLExecute. | |
| The Prepare part of it logs one row with everything zero to DBQL, followed by another row with actual cpu,spool, IO etc...that will be
consumed by SQL Execute function which actually runs query. | |
| To get correct query counts you may ignore the rows which have ampcputime=0,WDID is null for a particular statement Type. | |
Look at ExtraField5 in the dbc.dbqlogtbl. Assuming the query is a select, you will see both statements with StatementType = 'Select'; however,
'Extrafield5' will show one with 'Select' and another with 'Other'. The 'other' is the prepare statement.
| |