Right now, after an index is set on an entity, there's nothing to remind you that it's there. There's nothing visible on the entity itself unless you open the specific Indexes tab, when retrieving from database there's no reminder that there are indexes, the only way you might find out is if you get recommendations in the MxAssist Performance Bot.
I would like to propose adding indexes to the retrieve pop-up as a reminder of which indexes exist, and in which order. It could look something like this (excuse my editing skills):
I feel like this will help people keep in mind indexes a little bit more when writing optimized xpath retrieves and/or sorting.
While I agree with Tim that the ideal situation would be that Mendix automatically handles indices in the background and optimizes them automatically, that's currently not the case yet and developers very much have to be in control of them. That's why I still think this idea should be added for now, even if it just means it'll be removed again once index-handling is automated away.
Simple addition pointing developers to (avoiding) potential performance issues, I like it!
Performance bot can be helpful but as Tim already pointed out, at the same time gives false recommendations as it doesn't know how many rows are being read or written during runtime. So unfortunately the most likely way to get reminded about missing indexes is still through reports from end users or as part of peer review sessions.
Indexes should not be of a concern that has to be dealt with by the developer, since it depends on runtime characteristics of the entity. And we want the Mendix-platform to make everything easier for developers. This is one more thing that the Mendix-platform can be good at. Therefor I propose another idea: Make the Mendix-platform manage the indexes. Not the developers.