READ performance

Hi everyone,
For the purpose of optimizing ADABAS access using READ statements, i would like to know the difference between the following in terms of better performance:

(a). READ file with SD-99 =

(b). READ file with SD-99 FROM THRU

©. READ file with SD-99 FROM TO

Thanks for your time,

Let’s assume, for purposes of discussion, that the range of values you have for SD-99 encompasses 23 records.

Only © will read 23 records. (a) and (b) will both read 24 records. (Although © will do an RC command to Adabas that the others will not; however, no record will be read).

Now suppose there are 5,000 records in the range. The difference between reading 5,000 and 5,001 records is, percentage wise, rather trivial.

Now suppose there is but one record in the range. The difference between reading one and two records is substantial (percentage wise).

There are other performance differences to consider if you are using MultiFetch, but lets not complicate the issue if it is not relevant.


I see. But is it safe to generalize that, for files with 20000-30000 records and I only need say, 30% of them at one time, the most efficient access is ©? In this case, is there a difference between using (a) or (b)?

Is Multifetch really that a big factor/difference in the performance of ADABAS access? I’m also trying to study how effective multifetch is in improving response time for files with at least 10,000 records. Thanks!

MultiFetch can be a very significant factor in performance. Suppose you can reduce Adabas calls from 10,000 to 200; you would see a sharp drop in elapsed and CPU times.

If you have a file with 30,000 records, and need 10,000 of those records, and need them in sequence by SD-99, it might well be the case that reading the file in physical sequence and ACCEPT’ing records in the desired range, and then SORT’ing the resultant 10,000 records will be more efficient than any READ LOGICAL.

There are many criteria you would have to take into account; e.g. average number of records in a physical block, how close the file is to SD-99 sequence, whether UPDATEs will be performed (also critical for MultiFetch considerations), etc.

There is NO simple answer for questions such as you asked. There are too many variables that go into an answer.