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: is Null or = null and a slow query

Re: is Null or = null and a slow query

From: Jack Addington <jaddington_at_shaw.ca>
Date: Fri, 04 Nov 2005 18:19:51 GMT
Message-ID: <bDNaf.402803$1i.368559@pd7tw2no>

<willy_gates_at_hotmail.com> wrote in message news:1131120551.077847.20910_at_g43g2000cwa.googlegroups.com...
> Yes this seems to speed things up a bit.
>
> Follow up questions:
>
> 1> Why?
> 2> What about if my columns could contain null values?
>

  1. I am working on a similar query and I believe the reason is that the combination of the null = and the bind variables confuses the optimiser. I had finally tweaked this monster query to have excellent response and then I threw it in a PL/SQL block and the performance crashed hard. When I run in sql window without bind variables then the optimizer ignores all the where clause entries where I have null = null or ... I am playing around with the nvl bit as well.
  2. I'm not sure what the best method is but I am going to try adding some function based indexes to remove the null from equation.
Received on Fri Nov 04 2005 - 12:19:51 CST

Original text of this message

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