Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 06 Dec 2004 @ 18:07:28 GMT


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


Subj:   Re: Statistics Problems
 
From:   ulrich arndt

Clay,

  Regarding statistics; however, I'll still have a problem when I try and join view A_Current.ColA to another table because the optimizer has no stats on the ColA (since it is built in spool by coalescing the base table and the shadow table.)  


I tried some more things but didn't manage to get a sufficient result in respect of stats.

Two exemptions:

First: Populate always Col_A and Col_A_Shadow and update only _shadow in case of changes - high disk space usage and overall not elegant :-(((.

Second: - the current view is the standard view which will cover most of the requests.


In this case simply change the "meaning" of the shadow columns in the way that the shadow columns contain the original values.

The Update statement which is used by the application will than be like

     Update table_A
     set column_A_shadow = column_A,
         column_A = NEW_VALUE
     where PK_A = PK_VALUE;

The current view is simply presenting the column_A where the OLD view is using the Coalesce.

In this case the current view would have complete stat information.

But as mentioned before it will depend how often which view will be used.

Kind regards

Ulrich Arndt

www.data2knowledge.de



     
  <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