Xref: alice comp.databases.oracle.server:77499
Path: alice!news-feed.fnsi.net!newsfeed.icl.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail
From: "Peter L" <news@abc.freeserve.co.uk>
Newsgroups: comp.databases.oracle.server
Subject: Re: Tune SQL query
Date: Sun, 12 Dec 1999 13:27:55 -0000
Organization: Customer of Planet Online
Lines: 19
Message-ID: <830d6k$65k$3@news6.svr.pol.co.uk>
References: <82rpoe$g3p$1@nnrp1.deja.com>
X-Trace: news6.svr.pol.co.uk 945010708 6324 62.136.59.67 (12 Dec 1999 14:58:28 GMT)
NNTP-Posting-Date: 12 Dec 1999 14:58:28 GMT
X-Complaints-To: abuse@theplanet.net
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3

weijendavid@my-deja.com wrote in message <82rpoe$g3p$1@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?


