I wonder if there are any risks to adding new indexes on ExpressionEngine tables in MySQL? Will / can these indexes get dropped during EE upgrades? Will / can these indexes interfere with EE upgrades?
As some background: I understand the principles of database indexes, etc., so my interest in adding them is generally informed.
One of the ExpressionEngine sites we created for a client uses some custom queries on most pages, using exp:query. They work fine, but there’s a question from the client about query performance (it’s a long story—note that the site uses EE caching, and so the queries aren’t actually executed all that often).
In any case, I can improve the performance of these queries by adding new indexes in MySQL, for example, adding an index on parent_id makes an obvious difference on this query:
SELECT a.cat_id, cat_name, cat_url_title, cat_description, cat_image FROM exp_categories as a where parent_id = 68
Are there any downsides / risks to adding additional indexes like this? Does anyone else do this?