Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 14 Nov 2003 @ 20:36:17 GMT


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


Subj:   Re: Trace in Teradata
 
From:   Ballinger, Carrie

Milan,

If you are on V2R5 you can enable query logging for the DBQLStepTbl, which can help with query tuning. When you log to the step table, you will get one row for each step that executed in your query, with the start and end times and row counts for each step. Here's what some sample output for one query looks like. You can see in this case that almost all the query time was spent in step 4, the join, and that 131,158 rows were spooled in that step.

QueryID Step  StepName  StepStartDate        StepStopDate         RowCount
765     1     MLK       2003-06-27 08:38:02  2003-06-27 08:38:02  1
765     2     MLK       2003-06-27 08:38:02  2003-06-27 08:38:02  1
765     3     MLK       2003-06-27 08:38:02  2003-06-27 08:38:02  1
765     4     JIN       2003-06-27 08:38:02  2003-06-27 08:47:11  131158
765     5     SUM       2003-06-27 08:47:11  2003-06-27 08:47:13  1
765     6     RET       2003-06-27 08:47:13  2003-06-27 08:47:13  5
765     7     Edt       2003-06-27 08:47:13  2003-06-27 08:47:13  1
765     8     RSF       ?                    ?                    ?

If you are using query log for query debugging, you might want to end logging as soon as the query completes, to get the cache to write its contents to disk so you can see the rows. Otherwise you'll have to wait until the cache fills up and it forces the rows out, before you can see them.

Thanks, --Carrie



     
  <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: 15 Jun 2023