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: Fine point on rowtype and update

Re: Fine point on rowtype and update

From: Christian Antognini <christian.antognini_at_trivadis.com>
Date: Tue, 24 Aug 2004 12:12:03 +0200
Message-ID: <412b1473@post.usenet.com>

In addition...

c) Even though the value does not change, triggers are fired.

Chris

"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:cg7b0n$41b$1_at_sparta.btinternet.com...
>
>
> Since the pl/sql call is turned into an
> 'update every column' statement you are,
> indeed, updating the primary key, and every
> other indexed column for the row.
>
> Of course, you may not be changing the values,
> so you don't necessarily leave Oracle chasing
> down indexes to modify index entries, but there
> are two side-effects:
>
> a) Even though the value does not change,
> a primary key update is a cause of the old
> PK/FK locking problem on the child table.
> So if you thought your application didn't
> need an index on the child table - suddenly
> it does.
>
> b) Since you are updating every column in
> the row, the previous (possibly unchanged)
> values are copied into the undo record, and
> then into the redo record for the change. Using
> this technology puts you right back into the
> "Oracle copies the whole row into the undo"
> arena. The overhead may be a problem.
>
>
> --
> Regards
>
> Jonathan Lewis
>
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
> The Co-operative Oracle Users' FAQ
>
> http://www.jlcomp.demon.co.uk/seminar.html
> Optimising Oracle Seminar - schedule updated July 27th
>
>
>
>
> "nullpointer" <null_pointer_at_rediffmail.com> wrote in message
> news:c0728f9d.0408192205.4a4dbfb2_at_posting.google.com...
> > Just wondering if its a good idea to update using the rowtype
> > variable. You might end up updating the primary key.
> >
> > Any thoughts ??
> >
> > Dev
>
>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Tue Aug 24 2004 - 05:12:03 CDT

Original text of this message

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