× 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, Vinay:

Consider that doing a SETLL followed by a test of an indicator and then a READE requires two external program CALLs to the "database" routines in the OS ... while doing a CHAIN requires only one external call to a database routine within the OS.

Here we have some additional CALL "overhead" and if you are going to do this "millions of times' that can add up.

So, if you can code it using a CHAIN, I would go that way.

But if you are going to position to a record and then read several records with the same (partial) key, then it would make sense to do a SETLL followed by a READE in a loop. Pseudocode:

SETLL
if Found then
READE
do while Found
... process the record ...
READE /* next record ? */
enddo
endif

Does that help?

Mark S. Waterbury

> On 10/14/2013 12:44 PM, Vinay Gavankar wrote:
Hi,

I know this has probably been hashed a lot of times, but which of this is more efficient?

Doing a direct Chain or a SETLL and if %EQUAL doing a READE

I am accessing on a full unique key, but performing this millions of times in a batch program.

Most of the times the record WILL be found.

Thanks
Vinay


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.