I have been searching and reading about this, but I have not seen anything definitive about the topic of adding indexes to Drupal tables (both core and contrib).
My main concern is what happens with any custom indexes when you update core or contrib code and there are schema changes. What happens in this case?
EDIT:
I think some context may help. I am primarily concerned with adding indexes to tables to tune site performance (queries showing up in the slow query log, pages with slow views, etc). This may involve adding an index to a table in someone else’s module. For example
- I install module
foo
- Module foo creates table
foo
- I add an index to table
foo
- Module
foo
has an update that changes the schema
What happens?