How Does Sorting Affect the Performance and Purpose of Batch Processing in Mendix?

0
In Mendix, batch processing is intended to improve performance by handling data in smaller chunks instead of processing everything at once. However, if we apply sorting during batch processing, doesn’t it negate this benefit? Since sorting requires the runtime to fetch all the data first and then sort it, wouldn't this impact performance significantly and undermine the primary advantage of batch processing? Could someone clarify the purpose of batch processing when sorting is involved and how to mitigate any performance trade-offs ?
asked
2 answers
0

Obviously, if we are applying a sorting there is a negative impact on processing. 

Please be aware that under the hood, Mendix uses PostgreSQL by default. So query will be made accordingly.

 

To improve performance while retrieval of data in batch processing along with sorting, it is recommended to enable the sorting attribute as an index of the entity. This will improve the retrieval speed. Also, keep in mind that indexing unnecessarily also not good option.

answered
0

Hello Abhay Saxena,

 

Possibly, i think yes it will diminish the performance compares to retrieves without a sorting, however i could not find any documentation on this.

But the best way to find out is to test it yourself and see what the performance is doing and how the queries are set up.

 

Hope this helps,

 

Good luck!

 

 

answered