Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
unidentified user
QuikeyMan
Posts: 2
Registered: 06-07-2011
0

Cleanup Print Invoice Work Tables

We are running mas500 v6.3, and our print invoice process has slowed considerably.  I performed some queries to see what was going on with the print invoice work tables, tarPrintInvcHdrWrk and tarPrintInvcDtlWrk, and there are 5000+ rows between the two.  My thought is that if the work tables were cleared, the print invoice process would regain some of its past performance.  First, however, I was hoping I could get a little insight into this.  Why might records be left, in particular, in tarPrintInvcHdrWrk?  Is there any danger of clearing out both tables?  In general, should not work tables typically be clean if things are running properly?  Any information on the subject would be greatly appreciated.  Thanks.

Sage MAS Partner
LouDavis
Posts: 544
Registered: 10-29-2008
0

Re: Cleanup Print Invoice Work Tables

There is no harm in clearing these tables.  In fact it is highly recommended to improve performance.  You would want to do this when no one is on the system and trying to print invoices.  The reason why these records may be left in the table is due to users closing out of the task incorrectly, or errors occurring that prevented the MAS 500 client from calling to its routine that normally cleans up these tables.

 

Unlike most other reports within MAS 500 that use temporary tables to generate reports, printing invoices requires the use of the live work tables as it is part of the Document Transmittal process, which wasn't designed to work with temporary tables.  Other tasks tied to Document Transamittal such as Sales Orders also have this problem as well.  I believe Sage has a list of these tables in one of their knowledge base articles that you need to periodically clean up to improve performance.  I looked for it on their site, but the knowledgebase search didn't find any existing articles with this information.  I would suggest contacting your reseller or MAS 500 support to get this list.  Once you get it, create a SQL job that runs after hours or during slow periods that goes out and cleans up all these work tables.

Louis Davis MCSD, MCAD, MCITP
e2b teknologies, inc
www.e2btek.com

unidentified user
QuikeyMan
Posts: 2
Registered: 06-07-2011
0

Re: Cleanup Print Invoice Work Tables

I appreciate the response Lou.  Prior to reading this, I ran a few SQL traces to see when the work tables were being populated with information (which happens upon selecting to print an invoice) and when the information was removed from the tables (a cleanup routine that runs when a user exists mas500).  Upon seeing this, I found it safe to purge some of the older rows from the table, and will completely remove all rows during off hours this evening.  For anyone interested, tarPrintInvcPAWrk is also involved in the cleanup routine when exiting mas500.