Query to find Long running active queries

Database
Enthusiast

Query to find Long running active queries

We use Teradata to support out Enterprise data warehouse which is having over 3000 Tables. Sometimes some of the queries taking longer time due to bad indexes, distributions and other performance issues. These queries are affecting other loads. This is basically a shared environment. We are trying to build a process in the back ground unix server to check regular interval of time(like every hour) if any active queries running over one hour. 

We have the access to DBQL tables but not able to find all the details in QRYLOG.  Is this table is going to record all the active loads or it going to update once load process completed? Would you suggest me with if we have to use any other tables or query to achieve this ?

 

Thanks in advance for your help.

4 REPLIES
Junior Supporter

Re: Query to find Long running active queries

You can use MonitorSession to identify long running active queries.


Abhishek Jadhav
Enthusiast

Re: Query to find Long running active queries


Abhishek_Jadhav1 wrote:

You can use MonitorSession to identify long running active queries.



Thanks for your reply. I dont have access to MonitorSession. Do you know how to achive using DBC tables ?

 

Enthusiast

Re: Query to find Long running active queries

Enthusiast

Re: Query to find Long running active queries

Thanks for your reply, i already saw that post. I obeservedElapsedTime in DBC.QRYLOG is updating after completion of the query. Not for active queries.


awaiskaleem wrote:

see comment from @joedsilva on this

 

http://community.teradata.com/t5/Tools/Longest-Running-Query/td-p/6671