Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 09 Nov 2006 @ 18:26:52 GMT


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


Subj:   Re: Value Ordered NUSI & Regular NUSI on Same Column?
 
From:   Dieter Noeth

David Wellman wrote:

  I don't think there's any advantage to having both a hash and value ordered NUSI on the same column.  


  If a query specifies "WHERE date-column = value" then either type of column will allow the indexed access. So what's the reason for having both ?  


Full Ack.

IMHO there's no reason, i usually recommend ORDER BY VALUES if there might be any ranges within WHERE. And even if there's no range, there's no disadvantage i'm aware of.

And a big plus might be a value-ordered multi-column index:

     create index (col1, col2) order by ...(col1);

Now you can use that index similar to a two column B-Tree, all following WHERE-conditions could do an index access:

     col1 = x
     col1 between x and y
     col1 = x and col2 = z
     col1 between x and y and col2 = z

Dieter



     
  <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