performance differences between XPATH, SQL and OQL
Hi there Regarding performance while reading data: Is there a general best practice or Pros and Cons considering the differences between XPATH, SQL and OQL? Thanks and best regards Bjoern
Depends what performance you are aiming on; Developer performance or app performance.
In general a direct SQL can perform better than XPath which needs to be converted in SQL. But why the hassle of implementing your own SQL queries, when XPath is out of the box available and performing well in most situations?
Also since XPath is available everywhere in Mendix and most easy to maintain.
Thus my best practice; always use XPath.
If there is a reduction performance;
Optimize order of queries involved
Optimize processing of data, batches or smarter retrieves
Identify if use of Indexes are of added value
If all above doesn’t work; I might consider SQL. (but even then...)