Hi Hamid Rezaie,
What SQL query did you use for the database retrieval?
for optizimation go through this documentation
https://docs.mendix.com/refguide/community-best-practices-for-app-performance/
Hi Hamid
Database Views
For very complex calculations, consider using database views or stored procedures that can be pre-computed on the database side. This reduces the amount of logic that needs to be executed by the application.
Set a Row Limit:
For large datasets, limit the number of rows displayed at once. Displaying hundreds or thousands of rows at once can be very taxing on the browser. Instead, consider displaying a smaller, manageable set of rows with pagination or filtering.
Hello Hamid,
The best practices for mendix can be found here :
https://docs.mendix.com/refguide/community-best-practices-for-app-performance/
However, in your case, if i am understanding it correctly, you get data from outside the mendix database with an sql query and within the query you do calculations and after you do more calculations, so probably the problems is lying in there question you can ask that would maybe help you are the following:
- can i reduce the data collected
- do i really need to calculate the fields at the moment of retrievel can it be before or can it be later, can it be done in the background.
- can i optimize the query there is a lot of information around sql queries on the internet
https://www.geeksforgeeks.org/best-practices-for-sql-query-optimizations/
Hope this gives you some direction,
Good luck!
When retrieving data from an external database and showing it in a data grid, there are 2 main causes of bad performance:
in your case it looks like you are running into both problems, and you may need to address both.