END TRANSACTION efficiency

Hello

We traditionally ET in batch every 50 records or so for performance reasons.
I am wondering if this is still the case, or can we just ET every record?
Usually about 100 bytes of data is provided with the ET for restartability.

Thanks
John de Britto

As you correctly noted, the purpose of ET in batch is to minimize the amount of additional work that would have to be done in a restart situation (and, also, sometimes, avoid problems like overflowing the record hold queue; creating record deadlocks, etc).

There is a tradeoff inherent in the process. End Transaction statements in Natural generate calls to Adabas. Adabas might have to do a buffer flush, will have to release held records, etc.

If you do an ET after every record you will absolutely minimize the amount of work required to recover from a problem since your “logical transactions” are simply one record in duration. On the other hand, you are paying a large price in performance.

If you are like most shops, the frequency of recoveries that involve restarting an application are quite small.

If anything, you might discover a pleasant performance benefit from going in the opposite direction from the one you are considering, namely issuing an ET after 100 (or more) records are processed. Yes, a restart event would be slightly longer, but how often does this happen in your shop?? My guess is quite rarely.

Looking at the question a bit differently, suppose you have a phobia about running out of gas while out in the middle of nowhere. You could, everytime you go anywhere (like to the nearby store), fill up your tank before parking your car at home. Now you are ready to go the entire range your car is capable of on one tank of gas.

Do most people do this? No. You fill up when you are starting to get low. The annoyance of going to a gas station after every trip, no matter how small, would outweigh the benefit of always having a full tank.

On the other hand, if you are in a situation which might require you to hop in your car and travel a long distance in a moments notice (you are a volunteer fireman, you have parents who are ill, you have a pregnant wife) you might well reconsider what “low” means vis a vis fill up time. You might always want to have enough gas to meet such a situation. Same thing with ETs.

You try to minimize the ETs without impacting your company “mission”, which probably includes an acceptable recovery time. Of course, as noted earlier, there are other factors like the record hold queue, etc., but the analogy is somewhat valid.

Hi Steve

Thank you for your reply.

I was hoping advances in Ada/Nat would make ET batching unnecessary.
You are correct that failures are uncommon and extra restart work is worth the performance gain for the other 95% of the time.

We will stick with the status quo.

Thanks and regards
John