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: Strangeness

Re: Strangeness

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 08 Mar 2002 03:33:28 -0800
Message-ID: <F001.00423214.20020308033328@fatcity.com>

If you can re-run both programs, I'd check the amount of:

    undo
    redo
    redo synch writes.
and of course the v$session_event/wait,
and there's always the rows_processed
column from v$sql. All quick ways of
checking for symptoms, which may give
you a clue about cause.

It is possible that a minor bug in the Pro*C could mean that each update was updating every single row in the table on every update (don't laugh, I've seen it before), whereas the PL/SQL, being easier to read and write, is coded correctly.

Is it possible that the Pro*C uses an 'in-house library' for its updates that generates code to update every column in the table ? Whereas the PL/SQL is hand-coded to update only the changed columns

Is the code doing single row commits inside a loop ? I wouldn't expect this to make a factor of 100 difference (correct my arithmetic if it's wrong), but PL/SQL cheats on commits in loops, and the saving can be significant.

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar - UK, April 3rd - 5th
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases

-----Original Message-----
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Date: 08 March 2002 11:21

|Oracle 8.0.5.0.0
|Tru64 4.0f
|
|We have a process running here and without going into the detail of
it we
|have a Pro C program that is taking ages to run updates and selects
(2
|hours to do 10000 records). The program was changed to PL/SQL and we
|suddenly were seeing 5 million records processed in 1 hour.
|
|Is PL/SQL that much faster than Pro C. Can somone more in the know
give me
|some hints ??
|
|TIA
|

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Lewis
  INET: jonathan_at_jlcomp.demon.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Fri Mar 08 2002 - 05:33:28 CST

Original text of this message

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