I am just starting to learn about database administration and touching on the issue of creating indexes to improve performance. My Moodle is slow for enrolling students to courses.
So I was wondering if Moodle comes already with automatic indexes for this table or if this is something that administrators (or hosts) commonly implement to improve performance.
Do rows for enrollments from courses or users that were deleted get deleted too from the table, or they keep accumulating forever? We have an instance that is running for more than 10 years, it started small and now it is pretty big. So I was wondering if the solution could be establishing indexes to help moodle update the current academic term, the only that is really relevant, to make the process faster, or simply deleting old rows or what.
Old messages are also kept forever with no way to quickly delete those, I saw messages from 2010, so our tables are getting really large.
Any advise towards improving performance on enrollments especially, would be appreciated.