Most report in ERPNext takes about 5 to minutes to run when database in 1 year old

Most report in ERPNext takes about 5 to minutes to run when database in 1 year old , does anyone face such a challenge and other databases that does 300 sales invoices per day may take about 10 minutes as well because they will have a lot of data . I think its best to have the data stored in a table rather than having the system to start calculations each time you need data but its a quite a big task consindering majority of fiancial reports are like that . Whats your thoughts ?

If it is affecting most of your reports, it might be a hardware problem rather than a software one.
Therefore, you could consider upgrading your hardware.

If you are on an online subscription for cloud infrastructure, upgrading to higher-tier with more CPU or RAM could help. If you host it locally adding more computing resources like increasing SSD space, or adding more RAM…etc would certainly help.

Upgrading frappe and erpenxt could also help to some extent, as the frappe team regularly solves performance issues and reduce bugs by removing heavy and unwanted old codes.

Other option, is to try re-writing one of the report’s code. Maybe there is certain bottleneck or performance issues in the frappe/s original code that affects your use case of erpnext.

its not hardware issue , l think even here most people complain about it even some users on frappe cloud , its actually how Frappe was designed . One of the servers we have have about 48 gig ram and used by 10 concurrent users and with around 30 000 . ERPNext is structured in a way that if you want to run a customers statement it goes an loops in all sales invoices , payments , journal entries then fetch all transcations that belong to that customers so that consumes a lot of resources and time . So issue is that , thats how ERPNext have actually been structured .

Which reports are these? Have you made a Period Closing Voucher or Stock Closing Entry?

No l have not made any period closing os stock or anything like that .
The reports are General Ledger , Profit and Loss , Reciavables , in summary all reports that you need to click on generate they are a problem because the system have to loop through the whole database and re calculate , it is how ERPNext is structured on any report that you have to first click generate report . The data will not not be there technically , the system have to provide it when its needed thus taking a lot of time to provide the data .

Try making a Period Closing Voucher, it should help in improving the GL report performance. Also, can you tell me if you’re on v15 or v16? I ask because v16 has significant performance improvements for both accounting and stock ledgers.

using V15 and v16 on other clients , some clients with retail shops we have put on V16 are already experiencing same issue they do around 1000 sales invoices per day so already now any report that uses button generate report are already slow . Then on issue of period closing voucher since we only use it once a year , it means it does not apply for any client with less than a year transcations yet the one we have issues in less than 4 months of operation , they take about 5 minutes to do customer statement . Thier scenarios is that they do avarage of 1000 invoices and 1000 payment entry per day so under 1 month they already have 60 000 invoices meaning if you are to run a customer statement it still have to loop through 60 000 records maybe for a customer with only 20 records the system have to go through 60 000 records to get those 20 records for that client thats where the issue is with ERPNext generate report

I think you are not on Frappe Cloud.