Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL-statment tuning

Re: SQL-statment tuning

From: Dave O'Keeffe <DOKeeffe_at_n0spam.cableinet.co.uk>
Date: Sun, 19 Apr 1998 23:23:35 +0100
Message-ID: <353A7967.310C@n0spam.cableinet.co.uk>


If, instead of NULL you can use a value that means NULL, e.g. "NOTHING" or "ZERO" then you can force it to use an index. However, the full table scan might still be the more efficient, it depends on whether this column has many values that are neither 1 or NULL.

Regards,

Dave O'Keeffe

Jürgen Kling wrote:
>
> Who can help me to optimize the following SQL statment:
>
> select * from TABLE
> where TAB_COLUMN = 1
> or TAB_COLUMN is null
>
> the Column TAB_COLUMN havein an index, but Oracle can't use it.
> Thus Oracle do an Full Table scan.
>
> Do somebody now how to change this statement
>
> jkling_at_w-4.de

--
For email replys remove "n0spam." from the above address Received on Sun Apr 19 1998 - 17:23:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US