Do not use SHOW COLUMNS FROM query if not needed
-
Your plugins executes “show columns from wp_XXXX_posts” at every load of the site which may cause performance issues on big multisites.
This operation is VERY EXPENSIVE. It will always require a disk read. It could be devastating especially for larger tables and since it’s used on _posts table it could cause serious problems.
I have seen this query to take up to 0,5 seconds with posts table greater than 750MB.
Also in most cases this query is executed and results are not used at all. It should be cached (wp tables aren’t changing very frequently) or at least used on demand.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Do not use SHOW COLUMNS FROM query if not needed’ is closed to new replies.