Full Table Scans
Need to optimize queries
A number of queries in VaultWiki result in full MySQL table scans to find the data. We should go through each query and make sure they are optimized.
So far the Legacy Converter post query had fetched the entire post table, which was not even intended.
In addition, the Whatlinkshere queries had full table scans of the link and namespace tables, and required a temporary table to be created.
When updating links in the link table, a full table scan was necessary to find the correct post, because the type required a regex or when it didn't the column wasn't indexed. Avoiding the regex is ideal.
There was a full table scan of the post table when inserting a template in an article.