Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Tune SQL query
weijendavid_at_my-deja.com wrote in message <82rpoe$g3p$1_at_nnrp1.deja.com>...
>
>Does anybody know how to tune the query below so it doesn't take
>"Forever" to run>
>-----------------------------------------------------------------------
>delete from caritemoption o where o.caritemid in
> (select ci.caritemid from caritem ci, car c
> where ci.carid = c.carid
> and upper(c.first_name) = 'xxx'
> or upper(c.last_name) = 'yyyy');
>-----------------------------------------------------------------------
As someone else has posted more background is needed to give advice on
tuning, however you appear to be converting the first and last names to
upper case then comparing against a lower case string. Is this just a typo
in your post? Also I don't know the logic behind what you are trying to
achieve but are you sure you don't want to bracket off the 'or' part of the
where clause?
Received on Sun Dec 12 1999 - 07:27:55 CST