Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 01 Dec 2004 @ 20:30:02 GMT

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

Subj:   Re: Statistics Problems
From:   ulrich arndt


why not adding a shadow columns to the 'real' table for all columns which can be changed by the user/application.

Defining them with compression shouldn't cause too much overhead if the table has not hundred of columns and billions of rows.

Hide these columns from the =B4normal=A1 user via a view and define a current view via the coalesce function.

No join at all would be required with the same functionality.

What I mean should look like:

     Create table a

     ( PK_A integer,
     COL_A integer,
     COL_A_SHADOW integer,
     COL_B VARCHAR(12),
     ) unique primary index ( PK_A );

     create view a_normal


     select PK_A,

     from a;

     create view a_CURRENT
     select PK_A,
     coalesce(COL_A_SHADOW,COL_A) as col_A,
     coalesce(COL_B_SHADOW, COL_B) as col_B

     from a;

The application is 'only' allowed to change the shadow tables.

Kind regards


  <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