I am writing a complex logic to calculate sales and customer bonuses. I have million of records to calculate bonuses.
I want expert opinions so that mathematical operation don't take much time to display result on web page.
So where I need to write calculation part? In SQL Server Queries (Using Stored Procedure and functions) or ASP.NET & C#.Net (Business Logic layer)?
Which one is the best practice? Processing on Database server or Processing on Application server?
Regards
Mohsin JK
If you have millions of records then I would suggest you to write calculation part in SQL Server as calcuations in Business Layer will significantly take more time.
Following are suggestions to improve performance -
You can search on net to find out T-SQL other performance optimization techniques.
I have million of records to calculate bonuses
I think it is better to calculate it in database to avoid passing large amounts of data from the database to application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With