Article Details
Id:9167
Product:finPOWER Connect
Type:NEW
Version:1.04.02
Opened:21/09/2011
Closed:22/09/2011
Released:25/10/2011
Job: J008191

General Ledger Export; optimise for database concurrency

The General Ledger Export has been optimised for database concurrency.

Optimise Queries
The transaction query was checking if a Transaction belonged to a Quote Account - an expensive sub-query. Quote Accounts do not have Transactions, and this was a carryover from finPOWER 5.

If licensed for the Entities Add-On, Bank Transactions are filtered by Entity. This was done via the following chain Bank Transaction -> Account Transaction -> Account to find the Entity - an expensive join. This has been changed to retrieving a list of Bank Accounts belonging to Entity and applying this directly to the Bank Transactions query (each Bank Transaction includes the Bank Account linked to).

Note, Account Transactions still require a join to Account table to verify the Entity.

Database Transactions
Each phase of the GL Export now commits the affected database records, which releases any database locks held. This means the length of time a database lock is held is shorter.

The downside to this is the GL Export may now be partially committed, ie it may fail part way through leaving some Transactions exported and others not exported. This does not cause any issues, it simply means the export will need to be run again.