Introduced in version 1.10 (May 2020)
More than a few columns hardly ever increase performance. In rare cases making sure an index has all the needed columns prevents a read of the table row.
The default is max 3 index columns.
Here are some tips by Martin Leppen:
Don’t put an index on every single attribute (or attributes with little variance).
Each index creates a new table and makes your database larger. Each update on an object also results in an update on all relevant index tables. Next to that, putting indexes on attributes where most values are the same (for example booleans), won’t really benefit the performance, since most of the table will still need to be evaluated.
Indexes are most useful on entities for which the amount of retrieves is far bigger than the number of changes.
Indexes slightly decrease the performance of table updates, because index tables need to be updated as well, but they greatly improve the performance of retrieves.
Additional resources on indices
- Mendix documentation: Implement Community Best Practices for App Performance – Studio Pro 9 How-to’s | Mendix Documentation.
- A recommended read is this great blog by Martin Leppen, Mendix MVP at Cape Group: Performance modeling in Mendix — Indexes | by Martin Leppen | Mendix Community | Feb, 2022 | Medium. Explaining everything you should know around indices.