Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 May 2004 @ 20:07:17 GMT


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


Subj:   Re: Feedback on Global Temporary Tables
 
From:   Hough, David A

  5. From what I've read it looks as though you can collect stats on them, but I haven't had any success doing that. I get an error message 5343 saying I can't collect stats on a materialized global temp table, but stats collected on an empty table are useless at best and misleading to the optimizer at worst.  


     COLLECT STATISTICS ON ... applies to the base table definition.
     COLLECT STATISTICS ON TEMPORARY ... applies to the materialized copy.

The manual says that the reason for the stats on the base table definition is so you can do a COLLECT STATISTICS ON TEMPORARY <tname>; and get all the stats you need in one collect statement. There are other rules in the docs to cover end cases.

I do not know if any empty base table stats are carried to each materialization...


/dave hough



     
  <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: 27 Dec 2016