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 QUERY TUNING

Re: ** SQL QUERY TUNING

From: Lothar Armbüster <lothar.armbruester_at_rheingau.netsurf.de>
Date: 17 Apr 98 21:12:24 +0100
Message-ID: <642.411T1201T12723536@rheingau.netsurf.de>


On 17-Apr-98 16:08:03 Jürgen Kling wrote:

>Who can help me to optimize the following SQL-Statement

>select * from table
>where tab_column = 1
> or tab_column is null

>Thje column TAB_COLUMN having an index, but ORACLE cant't use it. Thus
>Oracle do an Full Table scan.

Hello!

The problem is that nulls are not indexed so that your query cannot use the index.
Eventually a bitmap index can be used. I don't have Oracle available right now to check though...

Hope that helps,
Lothar

--

Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Schulstr. 12            | lothar.armbruester_at_t-online.de
D-65375 Oestrich-Winkel |

Received on Fri Apr 17 1998 - 15:12:24 CDT

Original text of this message

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