Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 31 Oct 2007 @ 13:49:59 GMT


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


Subj:   Re: Secondary Indexes Stats and Usage
 
From:   Diehl, Robert

You can turn on Query Object logging.

Example of turning on logging with object level and sql.

     BEGIN query logging with OBJECTS,  sql limit sqltext =0 on ALL
     account='$QX$&D&HCRM_DEV'

It will then be logged into view dbc.DBQLObjTbl.

You will want ObjectType = 'I' (joing indexes are J)

Column ObjectNum relates to the indexed displayed in HELP STATS

     select * from dbc.DBQLObjTbl
     where ObjectDatabaseName = 'tcy_customer'
     and objecttablename = 'Lkbk_Shop_Aggregate'
     and ObjectType =  'I'

DON't forget you need to keep the dbc tables small so set up an automated process to move the query logging to other tables.

On the stats, you can collect at the column level or the index level. The interpreter will take advantage of it either way. Most shops only collect at the column level for two reasons:

1) stats will stay around even if index is dropped.

2) stat jobs will not fail if index is not present.


Thanks,

Bob Diehl



     
  <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