Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Strangeness
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 Thu Mar 14 2002 - 15:59:26 CSTContent-Type: text/plain; name="ReadMe.txt"; charset="us-ascii" Content-Transfer-Encoding: 7bit The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail. This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification. ------_=_NextPart_001_01C1C75E.84166D00-- -- 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).
- application/ms-tnef attachment: winmail.dat