Number of queries by category - adhoc short,long,tactical

Viewpoint
Junior Supporter

Number of queries by category - adhoc short,long,tactical

Hi,

i want to create a report with number of queries running in the different categories i.e adhoc short,long,tactical etc.

We find this classification in the 'Workload' column in the viewpoint.

which dbc table or viewpoint option can i use to create this report. I can get the query info from from

DBQLObjTbl

DBQLOGTbl

DBQLSQLTBL

tables and querry logging is enabled.

Its little urgent, so early reply is highly apprciated.

4 REPLIES
Teradata Employee

Re: Number of queries by category - adhoc short,long,tactical

The "Static Pipes" view in the Workload Monitor portlet will give you the number of arrivals and completions for each workload over a 60 minute period.  (The "Static Pipes" view is the view with the pipe at the top and the data grid at the bottom.)  You can use rewind in Viewpoint to view any 60 minute period you wish.

Also, the DBQLogTbl table has the ID of the final workload for any logged query, so you could query that table as well.  You would just need to look up the IDs in the TDWM database.

Hope that helps!

Junior Supporter

Re: Number of queries by category - adhoc short,long,tactical

Hi stever,

Thanks for the reply.

I need this info for a full month, so the static pile won't help me much. I had looked into this today.

In DBQlogtbl, which column are you referring to. and which table in TDWM do i need to look these ids.

I believe this will help me in narrowking down to the solution

Could you please share the quey if you have it handy..

Teradata Employee

Re: Number of queries by category - adhoc short,long,tactical

WDID, FinalWDID, and TDWMRuleID in DBQLogTbl might be ones to look at.  You'd have to look at the DBQL documentation to know exactly which column is appropriate given your Teradata version and use case for your report.  In TDWM you would want to look at RuleDefs if running Teradata 13.10 or later.  If you are running Teradata 13.00 or earlier, it's WlcDefs.

Junior Supporter

Re: Number of queries by category - adhoc short,long,tactical

Thanks stever,

Your solution worked!!