× 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.



Hi,

IMHO it depends. It's possible to write bad code in each language.

Before release V5R4 triggers, stored procedures and UDFs may perform worse
than a native written RPG, Cobol or C program.
In former releases the C code generated by the precompiler, translated SET,
IF, CASE and some other statements into SELECT statements, accessing the
only row in the QSQPTABL. That means for each select statement a complete
optimization and data access must be performed, i.e.
1.The SQL statement is parsed,
2. The statement?s access plan is validated and planned again, if necessary,

3. An open data path (ODP) is created or reused and the cursor is opened
4. The row is fetched
5. The cursor is closed

With release V5R4 a new feature calle Expression Evaluater is introduced,
which allows to execute these statements directly without access to any
table. (But to profit from this new feature the SQL triggers, stored
procedures and UDFs must be recreated)

In this way native code may be faster than SQL generated code.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Luis Rodriguez
Gesendet: Wednesday, October 31, 2007 20:53
An: Midrange-L
Betreff: Re: DB2 Check Constraints - Reference a control file


Eric:

Good point. Now the question remains if a SQL generated
program (Aren't they in C?) is more efficient that a custom-made RPGLE
routine. If I can get enough time on my hands I'll check it out. That should
about 15 years from now, if I'm ever able to retire... :-)

Regards,

Luis Rodriguez

--- midrange-l-request@xxxxxxxxxxxx wrote:
------------------------------

message: 5
date: Wed, 31 Oct 2007 11:28:02 -0500
from: "Elvis Budimlic"
<ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx>
subject: RE: DB2 Check Constraints - Reference a control
file

I doubt it.

SQL trigger creates a program as well, so all other
things being equal, I
don't see why that program would run any faster than RPG program.

Elvis


Luis Rodriguez

IBM Certified Systems Expert
eServer i5 iSeries Technical Solutions


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.