Xref: alice comp.databases.oracle.server:19236
Path: alice!news-feed.fnsi.net!newsfeed.wli.net!su-news-hub1.bbnplanet.com!atl-news-feed1.bbnplanet.com!news.bbnplanet.com!news.ipass.net!not-for-mail
From: "David Sisk" <davesisk@ipass.net>
Newsgroups: comp.databases.oracle.server
References: <35376D45.16ED@w-4.de>
Subject: Re: SQL-statment tuning
Lines: 30
X-Newsreader: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Message-ID: <ErPZ.4$P3.123687@news.ipass.net>
Date: Fri, 17 Apr 1998 21:02:28 GMT
NNTP-Posting-Date: Fri, 17 Apr 1998 17:02:28 EDT

"SELECT * FROM table WHERE tab_column = 1"  would use a B-tree index if the
selectivity of tab_column is reasonably high OR a bitmap index if the
selectivity of tab_column is very low (<1%).  "SELECT * FROM table WHERE
tab_column IS NULL" cannot possibly use an index.  If tab_column of row x is
null, then the rowid of row x is not contained in the index, so there's
nothing in the index to read.  Try rewriting the statement without using the
IS NULL.

Good luck,
Dave



Jürgen Kling wrote in message <35376D45.16ED@w-4.de>...
>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@w-4.de


