Question

slowly retrieving data from the view VOUCHER_APPROVAL

  • 21 January 2021
  • 3 replies
  • 75 views

Userlevel 3
Badge +8
Hello,in the VOUCHER_APPROVAL view I have 5 rows. When executing select * from VOUCHER_APPROVAL query, I wait 5 minutes for the result. very long..  What could be the reason? Only on a production base.

This topic has been closed for comments

3 replies

Userlevel 7
Badge +19

Most probably you have a lot of approved vouchers in view VOUCHER? Probably some voucher types are set as “Store original” so that records are not removed from VOUCHER_TAB when you update to General Ledger?

Since you give no company, year or period in your query the database needs to go thru all records in table VOUCHER_TAB to get your 5 records.

Try adding a condition on COMPANY and ACCOUNTING_YEAR to see if that makes any difference.

Change YourCompany in the example below to your company.

SELECT *
FROM voucher_approval
WHERE company = 'YourCompany'
AND accounting_year = 2021

 

Userlevel 3
Badge +8

Where is parametr Store original?

Userlevel 7
Badge +19

It is defined here on the Voucher Type: