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: Best method: Update all fields or only those that have changed

Re: Best method: Update all fields or only those that have changed

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 2 Apr 2001 22:04:48 +0200
Message-ID: <tchntpa4n64j8c@beta-news.demon.nl>

"Rhugga" <rhugga_at_yahoo.com> wrote in message news:8qjhcts61mtg2pqotj0f0kmdl4uno919lg_at_4ax.com...
>
>
> I have some CGI stuff that interacts with various tables in Oracle,
> (no joins or anything like that). One group of scripts is a contact
> managment system I am developing and it uses a table with
> 44 columns. One part of this 'application' will allow the changes
> to be made which will be an UPDATE statement in the script.
>
> What is the best method to do: Only update the fields that were
> changed, or update every field even if it does not change. The
> entire record will be displayed in an HTML form, there they can make
> changes and they will be UPDATE'd back to the database. This script
> will be relatively simple if I just UPDATE every column, but I wanted
> to see what impact this might have on the Oracle side.
>
> I assume only updating the changed fields is the best moethod, but is
> there any harm in updating fields but not actually changing them?
> (There were always be at least one column in the table getting updated
> for real)
>
> I do not necessarily care about generating any extra redo/archive log,
> if that is the case.
>
> As a side note, would updating a field with not actually changing the
> value stored there generate redo?
>
> Thankx,
> CC

Oracle won't discover your update isn't an update. It simply updates whatever you supply it in the update statement. I guess this answers all your questions, doesn't it?

Hth,

Sybrand Bakker, Oracle DBA Received on Mon Apr 02 2001 - 15:04:48 CDT

Original text of this message

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