× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, Sep 10, 2008 at 12:45 PM, Lim Hock-Chai
<Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:
Interesting Benchmark. I've always heard people say that when doing
massive IO operation, SQL perform better. Your result doesn't seems to
support that (base on CPU time). Especially, RPG is doing extract work
of reading the data into the program first and then update, which, in
real world, most applications would need to read the data first, perform
business logic, and then update. Massive SQL update statement without
fetch first rarely happen in most applications.

See my post to Joe.


This is probably a Barbara question. I wonder if there is performance
different between update with and without %fields()?

Ok, here's basically the way RPG works:

without a results DS (assuming SEQONLY/BLOCK(*NO))
--when you issue a READ/CHAIN opcode, the program asks the DB to load
the record into a buffer, then the program moves the data field by
field into the i-specs defined for the file. If you debug without
options(*NODEBUGIO) you can actually see the i-spec fields being
loaded one at a time
--when you issue a WRITE/UPDATE, the program moves the data from the
i-specs to the buffer one field at a time and tells the DB to
write/update the buffer. If you use %FIELDS(), then only the
specified fields are moved back into the buffer.

with a results DS
--the DB loads and writes directly from the DS you've specified. Thus
there's less movement of the data and performance is improved.

I couldn't find the post where Barbara explained this, but it is out
there somewhere, any mistakes in the above are mine <grin>

HTH,
Charles

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.