Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 19 Jan 2005 @ 15:36:12 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Are my Primary Indexes being used?
 
From:   Edelsberg, Philip

Chris,

I'd stay away from using CollectTimestamp as it's value is when the segment that holds DBQL detail rows is initialized. There could in fact be days differences between CollectTimeStamp and when the queries were run, depending on activity.

I prefer using the expanded account string or the StartTime.

However if TDQM is being used there can be a delay between the StartTime and the FirstStepTime.

     Select
     l.ExpandAcctString
     ,l.SessionID
     , l.QueryId
     ,d.DatabaseNameI as User_ID
     ,((l.LastRespTime - l.StartTime) Day(4) to Second) as Duration
     ,l.StartTime
     From  DBC.DBQLogTbl l,
              DBC.Dbase     d
     Where l.UserID  =  d.DatabaseID
            and Duration > '0 00:04:00.000000'
      --    and l.StartTime >= '2004-12-20 00:00:00'
      --    and User_ID     =  'DSS_Tst'
     order by 5 desc

The above can be changed to using the DBQL views instead of tables.

Philip L. Edelsberg, CCP, PMP.
Teradata Certified Master



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 23 Jun 2019