How do I add indexes to WordPress Database?

I got a message from Hostgator about my account being suspended because of the load it put on their servers. This is about the fifth time this has happened. I am on a shared server.

And they said it could be resolved by simply adding new indexes to the database or optimizing the database using other techniques. I have been using SQL queries and the “optimize” option in phpMyAdmin to optimize my database but that hasn’t helped.

I have also installed Super Cache as recommended by them but this hasn’t helped either.

Now, I want to try adding indexes to the database. How do I do this? Does anybody know how to do this please? It’s urgent.

Thanks.

3 Answers
3

The WordPress database is already indexed. See this codex article for a detailed list of indexes per table: http://codex.wordpress.org/Database_Description

And even if it weren’t, you’d need to know what queries are being run in order to effectively add indexes. Meaning, there would be no quick fix–you’d have to learn how indexing works, figure out what queries are performing poorly, and go from there.

If you really do have slow query issues, it most likely has to do with a poorly written plugin or theme file you’re using. Try disabling all plugins and switching to the default theme, to see how it affects performance. If your site is still too taxing for your shared host (with a default theme and no plugins running), you need to move hosts.

Leave a Comment