|
Hi Charles,
Thank you for your note.
Both tables are being journaled. The application table is because the ERP
package requires it. The interface table is because the Microsoft BizTalk
Server, which is reading the table, requires it to be.
I didn't have an isolation level specified on the INSERT statement in the
trigger. I added "WITH NC" and the results were no different. When
testing from the green screen, I have RUNSQLSTM ... COMMIT(*NC). When
testing from System i Navigator Run SQL Scrips, I have Isolation level *NC.
The record length of the master file is 2303 bytes.
The record length of the interface table is 3944 bytes.
So, 107 description lookups...each one to a different table I assume?
The UDFs retrieve a description from a support table for a specified code.
Eg. get_colour_desc(10) returns 'WHITE', which is stored in the IPCOLOR
table. Similar for get_vendor_name, get_tax_code, etc.
I changed the trigger and replaced the 107 references to a UDF to ' ' and
drastically reduced the times to an average of 2.6 seconds / thousand.
While this is still 5x slower than without a trigger, this is by far a big
improvement.
Because that not the way triggers work. After triggers can throw
I don't completely understand why the application is caused to wait if this
is an "after" trigger. If there is a trigger, I can understand the DBMS
has to take time to fill a buffer of data. Once the buffer is filled, why
can't the application continue, even if the trigger had a DLYJOB for an
hour?
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.