|
|
Archives of the TeradataForum
Message Posted: Wed, 17 Jan 2001 @ 18:57:26 GMT
Subj: | | Re: OR in a WHERE clause |
|
From: | | Frank Martinez |
This is a much more complicated question than you think. The index (NUPI
or UPI) will not be used if a full table scan would be more efficient,
even if you were using an AND. But since you're going after specific
values, from what appears in your example, and IN clause COULD use the
NUPI, if all of the other considerations (ie selecting less than 20% of
the table, etc.) are met. Of course, having statistics on the NUPI would
help. The only way to tell is to examine the explain.
iv
Frank C. Martinez IV
| |