|
Hi, Glenn:
With row-level triggers, the DB2 database will have to issue a full EXTERNAL program call for each record, to call the *PGM of the trigger.
It is known that full external program calls are much more expensive in terms of overhead than internal procedure calls, and so it is easy to imagine where some of this extra overhead comes from.
As others have mentioned, one way to minimize the impact on the applications using the tables or files that have triggers on them is to keep the triggers as short as possible and have them simply write the relevant information to a data queue, and then you can have one or more programs waiting on the data queue to service any requests that come in. In this way, you shift much of the overhead from the sequential path that is part of the WRITE or UPDATE to the original table or file, over to a separate "server job".
This technique of using data queues in this way has been around since System/38 CPF and those programs running as a server job were often called (colloquially) a "never ending program" (or NEP).
I hope that helps,
Mark S. Waterbury
As an Amazon Associate we earn from qualifying purchases.
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.