Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Which method is more efficient

RE: Which method is more efficient

From: Goulet, Dick <DGoulet_at_vicr.com>
Date: Wed, 28 May 2003 09:10:13 -0800
Message-ID: <F001.005A46F9.20030528091013@fatcity.com>


Bryan,

        First item is to define "efficient". Are you looking for efficiency in the update of data on the production database or the standby? The code needed to determine which columns need updating is going to be a real bear and could create several update statements per record. On the other hand the standby is going to expend the same amount of effort one way as the other. Personally I'd update everything, except the primary key.

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

-----Original Message-----
Sent: Wednesday, May 28, 2003 11:50 AM
To: Multiple recipients of list ORACLE-L

Hello everyone,

I have a question for the group of which method is more efficient.

To set the stage my company has a process to load part changes from vendors into the tables in an 8.1.7.4 Oracle database with archiving on and this database has a standby database at disaster recovery site, so nologging is not an option.

There is a discussion going on as to which method is more effective for updating the information in a table. In looking at effectiveness, I am looking at reducing the amount of redo information produced and having the database do the least amount of work.

  1. Method 1 is to update the information only for the fields that have changed, 1 field at a time.
  2. Method 2 is to update the information for all the fields in the record whether they have changed or not, 1 record at a time.

The size of the record is 1843 bytes and the distribution of field sizes:  2 fields varchar2(240).
 1 field varchar2(150)
15 fields varchar2(50)
1 field varchar2(3)

2 fields varchar2(20)
4 fields varchar2(40)
3 fields varchar2(1)
2 fields varchar2(25)

2 fields number(10,2)
1 field number(13,2)
1 field number(1)
1 field number
1 field varchar2(6)
1 field number (17,2)
1 field varchar2(4)
3 fields that are date.

In the past couple of months the average number of fields changed per record was 3 to 4 fields per record.

Thanks for your help,

Bryan Rodrigues
Oracle DBA
Elcom, Inc.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Rodrigues, Bryan
  INET: BRodrigues_at_elcom.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Goulet, Dick
  INET: DGoulet_at_vicr.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed May 28 2003 - 12:10:13 CDT

Original text of this message

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