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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ** SQL QUERY TUNING

Re: ** SQL QUERY TUNING

From: Ronald <_ronr__at__wxs.nl_>
Date: Sun, 19 Apr 1998 19:11:22 +0200
Message-ID: <B15FFCDA9668BE60@ut0132.wxs.nl>


In article <353770A0.35DD_at_w-4.de>,
Jürgen Kling <jkling_at_w-4.de> wrote:

>Subject: ** SQL QUERY TUNING
>From: Jürgen Kling <jkling_at_w-4.de>
>Organization: Concert Internet Plus
>Date: Fri, 17 Apr 1998 17:09:20 +0200
>Newsgroups: comp.databases.oracle.misc
>
>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.
>
>
>
>
>
>jkling_at_w-4.de

Even without the NULL values, the 'or' will prevent using indexes. Try to prevent using 'or' in the where clause.

Ronald



mailto:ronr_at_wxs.nl
http://home.wxs.nl/~ronr/RonR.html (last update: dec 31, 1997) Received on Sun Apr 19 1998 - 12:11:22 CDT

Original text of this message

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