Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 23 Jun 2003 @ 16:13:22 GMT


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


Subj:   Re: Statistics didn't change
 
From:   Geoffrey Rommel

Maeva, we may need a little more information.


  I work with federated systems.  


Are you referring to 'federated' as defined in IBM DB2/UDB?



  in each data sources (DB2,  


Is this DB2 for z/OS (mainframe) or for Unix (AIX, Linux, etc.)?



  After, I executed "collect statistics on column" then "collect statistics on table" . I re populated my nickname. I compare the new explain plans, but for Teradata, nothing has changed!!! Teradata after gathering statistics still thinks I have 1000 rows (I only inserted 100 rows).  


Well, in Teradata, the difference between 100 rows and 1000 rows is trivial; it would probably not be enough to change the query plan. Still, if the stats were collected correctly, they should be correct. (Dite-la trois fois rapidement!)

'Nickname' is not a Teradata term, but it is used in DB2/UDB. Are you running these statements through an IBM tool of some sort? It may have used improper syntax.



  But do I need to collect statistics on it [the index] when it is created by default?  


Yes. Statistics are null until you run "collect statistics".

By the way, this statement:

collect statistics on [database-name].[table-name];

re-collects only stats that have already been collected. If there were no stats before, there will be none afterwards.



     
  <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