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



> From: Buck
> 
> I strongly suggest that the original poster try the dynamic SQL before
> throwing it out as a poor performer.  It may run pitifully slow too,
but
> you just don't know until you try.

Nah.  CHAIN/UPDATE performs better than single-record dynamic SQL
UPDATE.  Period.  And until you run across a single situation where it
doesn't, telling someone to test out various SQL approaches is a waste
of time.  This is one of the things I hate most about SQL; people waste
a ton of time playing with SQL when they could write it in RPG and be
done.


> What performs badly on my machine with my dataset may scream on yours,
> and vice versa.  SQL is very unlike traditional RPG I/O because of the
> optimiser, which makes sweeping statements about SQL performance
> problematic at best.

Not on a single record update.  The only place you see such bizarre
swings in performance is in set-based operations, and that's primarily
due to whether or not you have the right indices.

The laws of physics are not rescinded in the SQL engine.  At the end, it
must still find a record, read it into memory, and write it back out.
With a dynamic SQL statement, it also needs to parse the statement and
find the file.  So unless we are in an alternate dimensions where the
time it takes to parse a statement and find and open a file is actually
negative, SQL cannot be faster.

Joe


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.