Query Logging NumResultRows column is always zero

Database
Enthusiast

Query Logging NumResultRows column is always zero

We are a new Tersdata site and I am investigating various auditing requirements. It would be useful to see who had changed data for which the NumResultRows column could be an effective filter, however, when I query it, it always has a value of zero. I cannot find an explanation for this in the manuals. Is this a bug\feature, and how can it be corrected?

The result of the SHOW QUERY LOGGING ON ALL query is
Rule UserName ALL (From an ALL rule)
Rule UserId 00000000
Account (Rule for any Account)

DBQL RULE:
Explain F
Object F
SQL F
Step F
XMLPlan F
Summary F
Threshold F
Text Size Limit 10000

Additionally, is there an explanation of what the above values 'F' means, as this is not obvious from the documentation.

thanks
4 REPLIES
Enthusiast

Re: Query Logging NumResultRows column is always zero

NumResultRows won't show you how many records are modified using an INSERT/UPDATE/DELETE statement. It only shows the number of rows returned as a result set from a SELECT statement.

The F in your above output indicates that those particular elements are not being captured in DBQL (it stands for False).
Enthusiast

Re: Query Logging NumResultRows column is always zero

Thanks mnylin.
I cannot find anything mentioned in the manual, but do you know if the number of records modified by a I/U/D staement is logged elsewhere?

thanks
Enthusiast

Re: Query Logging NumResultRows column is always zero

If you use bteq then there you can use ACTIVITY_COUNT to get hold of that.
Using this you might create your own audit table to keep track of the updates,deletes and inserts.

Hope it helps
Jeet
Junior Contributor

Re: Query Logging NumResultRows column is always zero

You'll find the requested info in dbc.QryLogStepsV if you enable query logging "with stepinfo".

It's the RowCount column for a UPD/INS/DEL StepName.
For a MERGE (MRM-step) RowCount is the number of inserted rows, RowCount2 is the number of updated rows.

Dieter