Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 01 Sep 2006 @ 17:02:36 GMT


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


Subj:   Re: Collect Statistics Takes 11 Hours
 
From:   Lunn, Jonathan

Just as a point of clarification, it might help to make sure that we're all talking about the same thing. The OP mentions collecting stats on the table vs collecting stats on columns and indices. If they really mean issuing a COLLECT STATS ON tablename as opposed to COLLECT STATS ON tablename INDEX(indexname), then the difference is obvious - collecting stats at the table level under the covers runs all of the individual collect stats that have been previously run for that table. That means that the table will be scanned once for every stat, so a table with 6 existing stats collected will be scanned 6 times, sequentially (no synch scans yet). This can be confirmed by running an EXPLAIN for the COLLECT STATS ON tablename statement. If this is the case, then it's no surprise that one takes longer than the other.


JL



     
  <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