Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 22 Nov 2002 @ 19:52:41 GMT

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

Subj:   Re: More Statistics Questions
From:   David Wellman

Where you'e got a composite index but some queries only specify one of the columns you could try the HASH ORDERED index option.

Syntax is: CREATE INDEX (col1, col2, col3...) ON TABLE t1 ORDER BY HASH (col1);

This gives you a composite index which contains data values from multiple columns (hence the index may be used to cover some queries) but is hash ordered by a single column. This last fact means that the index may be used when the query only specifies an equality constraint on that single column (col1 in this example).

Of course, if some queries use an equality constraint on col2 or col3 then the above won't help you....


Ward Analytics Ltd: Information in motion (www.ward-analytics.com)

  <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