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: Help needed for SQL Tuning...

Re: Help needed for SQL Tuning...

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 21 Jun 2006 23:03:24 +0200
Message-ID: <8vcj92hgu7msba0t18mdjlm0asfuf3a382@4ax.com>


On Wed, 21 Jun 2006 15:11:21 -0400, "Mark C. Stock" <mcstockX_at_Xenquery .com> wrote:

>
>"franck" <francois.bourdages_at_harfan.com> wrote in message
>news:1150915458.634962.87690_at_u72g2000cwu.googlegroups.com...
>: Your "and exists" part is not needed here. Because you have already the
>: same filter in your sub select.
>:
>: for the rest... waiting..
>:
>:
>: Titus wrote:
>: > Hello folks,
>: >
>: > Can someone assist in better tuning this query?
>: > It is taking over 45mins to complete the update.
>: >
>: > UPDATE supp_sec_tbl a
>: > SET a.descr =
>: > (SELECT b.descr
>: > FROM defn_tbl b
>: > WHERE b.rollcol = a.rollcol)
>: > WHERE a.dbase = :b1
>: > AND EXISTS (
>: > SELECT c.rollcol
>: > FROM defn_tbl c
>: > WHERE a.rollcol = c.rollcol);
>: >
>: >
>: > Titus
>:
>
>actually, i believe it is necessary, otherwise rows that do not have a
>corresponding DEFN_TBL entry will get updated to a null description
>
>++ mcs
>

Yes, they sure will be updated to NULL without the 2nd subquery.

--
Sybrand Bakker, Senior Oracle DBA
Received on Wed Jun 21 2006 - 16:03:24 CDT

Original text of this message

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