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: looking for doc with diagrams on redo and undo for java developers

RE: looking for doc with diagrams on redo and undo for java developers

From: Goulet, Dick <DGoulet_at_vicr.com>
Date: Tue, 28 Sep 2004 12:15:39 -0400
Message-ID: <4001DEAF7DF9BD498B58B45051FBEA6501B25C06@25exch1.vicorpower.vicr.com>


Hadn't really looked this thread over real well before, but now that I = have: Reuse should be the goal of all programming, never mind OO = programming only. Therefore writing your code so that it can be used 6 = ways to Sunday is the key. To the specifics here, why can't the = developers just pass what they need to the function so that each can = write his/her own update statement & one function runs them all. This = way your not limiting yourself to a particular sort of columns within = the table or a specific table at all. The called function wraps the = error handling and DB specific calls.

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

-----Original Message-----

From: Karen Morton [mailto:karen.morton_at_hotsos.com] Sent: Tuesday, September 28, 2004 12:04 PM To: oracle-l_at_freelists.org
Subject: RE: looking for doc with diagrams on redo and undo for java developers

Here's a simple example to illustrate.

Given the following:
Table t has 80,000 rows
 1,600 rows have flag =3D 'A' where status =3D 2 78,400 rows have flag =3D 'B' where status =3D 2

UPDATE statement:
update t

   set flag=3D'B'
 where status=3D2;

Generates 19M of redo and runs in 4.53 seconds.

If you change the statement to:
update t

   set flag=3D'B'
 where status=3D2
   and flag !=3D 'B';

Generates 500K of redo and runs in .83 seconds.

(Tests done on Windows XP with version 9.2.0.4)

Doing any work that you don't absolutely need to do is waste. The best way to improve response time and to make your application more scalable: don't do anything you don't need to do.

Karen Morton
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Upcoming events at http://www.hotsos.com/education/schedule.html

=20

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mercadante, Thomas F Sent: Tuesday, September 28, 2004 8:47 AM To: 'ryan_gaffuri_at_comcast.net'; oracle-l_at_freelists.org Subject: RE: looking for doc with diagrams on redo and undo for java developers

Oh and PS. =20
Explain to him that updating the primary key column will throw database locks all over the place. And this will cost time.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----

From: ryan_gaffuri_at_comcast.net [mailto:ryan_gaffuri_at_comcast.net]=20 Sent: Tuesday, September 28, 2004 11:37 AM To: oracle-l_at_freelists.org
Subject: looking for doc with diagrams on redo and undo for java developers

Object Oriented programming is all about reuse so our java guys made a universal update statement that updates all columns in a table, even unchanged columns. I know its bad, but its a major re-write to change this. I was digging through the otn docs and some books and everything that leads me to this requires a significant amount of reading. Multiple chapters etc... anyone know a short article that explains undo and redo along with diagrams and why its bad to update unchanged columns that is easy for a non-oracle person to follow?=20

checked the concepts doc, but they would probably have to read 50-70 pages to get the basic idea.=20

--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l Received on Tue Sep 28 2004 - 11:11:19 CDT

Original text of this message

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