Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 16 Oct 2006 @ 19:45:56 GMT


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


Subj:   Re: Way to Copy Statistics.
 
From:   John Hall

Just a quick question: When you switch tables, do you drop and re-create TableX_MV or do you perform a DELETE ALL from TableX_MV?

Did you know that when you do a DELETE ALL, the statistics on TableX_MV will still reflect the populated table? So if your process is to DELETE ALL from TableX_MV, you should only need to re-collect statistics on the NUSIs (which you dropped) and any columns that had significant changes to its metrics.

You might see if you can make changes to your batch process so that you can accept the performance hit of keeping the NUSIs (and their statistics) rather than dropping the NUSIs, re-creating the NUSIs and then re-collecting the statistics on the NUSIs.

Of course, it's probably a good time to question whether you really need all the NUSIs and whether you really need statistics on them (the random AMP sample might be sufficient).

I would also suggest that instead of renaming the tables to switch them, that you create 1:1 views for the two tables and use the views to do the switch.

One other point: Although I think that the TSET idea is a good one, I wonder if it has the testing and level of support that would permit you to use it as a key element in your production environment. As far as I know (and that's limited anymore), TSET is really intended for use in a modeling/developer environment and so using it in a production environment might be unacceptable.



     
  <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