Archives of the TeradataForum
Message Posted: Wed, 05 Aug 2015 @ 12:06:16 GMT
Yes, I think that is a reasonable conclusion.
Sure, some types of conditions are less likely to use a NUSI (inequality being one of them).
I ran a small test (TD 15.0.1) with a simple table:
CREATE TABLE t1 (col1 INTEGER NOT NULL ,col2 INTEGER NOT NULL ,col3 CHAR(200) ) UNIQUE PRIMARY INDEX ( col1 ) INDEX ( col2 );
I loaded 159K rows into the table and set the values of COL2 so that
- 3 rows had a value = 2
- all other rows had a value = 1
I collect statistics on COL1 and COL2 (as separate columns).
Explaining each of the following queries gives:
SELECT * FROM t1 WHERE col2 = 2; - uses the NUSI SELECT * FROM t1 WHERE col2 = 1; - does a FTS SELECT * FROM t1 WHERE col2 <> 1; - uses a NUSI
Yes this is a simple test case using contrived data, but I think it demonstrates the point.
Ward Analytics Ltd - Information in motion (www.ward-analytics.com)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|