Optimizing retrives

0
What is the best way to optimize a database retrieve?
asked
3 answers
0

Hey Andreia,

  • Make sure to add indexes to the attributes you often search for or retrieve. Indexes help the database find data quickly without having to scan the entire table.

  • Simplify complex XPath queries by breaking them down into smaller parts if needed. Simpler queries are easier for the database to execute efficiently.

  • Avoid using non-indexed functions like contains or start-with in your XPath queries, especially on large datasets, as these can be slow and inefficient.

  • Use constraints to limit the number of records you retrieve. For instance, use the Limit clause to get only the records that you need

 

Those are just a few things that you can do optimize the retrieves.

You can also learn by doing a certain learning paths like "Advanced Domain Model Skills" - module 4.

imagem.png

 

Also check this doc: https://docs.mendix.com/refguide/community-best-practices-for-app-performance/

 

Best Regards,

Ricardo Pereira

answered
0

Hi Andreia,

 

The question is a bit too broad to give you a specific answer however there is Best Practice documentation for application performance that would be a good place to start.

 

Community Best Practices for App Performance | Mendix Documentation

 

Hope this helps,

Sam

answered
0

There are several things you can do to optimize a retrieve:

  • Set an index on the attributes that you have used in the xpath.
  • if the xpath contains multiple parts, start with the "easiest" ones
  • ...

but the answer to your question is:

Performance testing against your (anonimized) production database under production-like circumstances.

answered