Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Tunning
Hi Roman,
Null means nothing. Null is not considered to be an equality, so indexes are not used. Also, whenever a row has a null value for an index, the rowid will not be entered in the index. There is no way to prevent a full table scan with this particular statement.
Hth,
Sybrand Bakker, Oracle DBA
Roman Gelfand wrote:
> Consider the following statement.
>
> select first_name, last_name from table_adress where address_id is null;
>
> Eventhough address_id is indexed uniquely, there is a full table scan. Is
> there a way to force index use without changing the sql statement?
>
> Thanks in advance
> Roman
Received on Sat Mar 20 1999 - 23:53:42 CST