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: Steve Johnson <sjohnson3_at_aegonusa.com-nospam>
Date: 22 Apr 1998 17:03:45 GMT
Message-ID: <01bd6e10$c6e2b400$2fc57ba2@ws0008083080>


Try changing your or statement into a union as follows:

select * from TABLE
 where TAB_COLUMN = 1
union select * from table
 where TAB_COLUMN is null

Hope this helps
Steve J.
Pei L. Ku <pku_at_gte.net> wrote in article <6havcj$683$3_at_gte2.gte.net>...
> Null is not your friend in this case....
>
> A long, long shot -- have you looked at bit-map index? I don't think it
> would solve your problem, but I'm not sure...
>
> Pei
> Oracle DBA
>
> Jürgen Kling <jkling_at_w-4.de> wrote in article <35376D45.16ED_at_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_at_w-4.de
> >
>
Received on Wed Apr 22 1998 - 12:03:45 CDT

Original text of this message

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