You must be registered to use SEARCH, REPLY, and for full board access! We are an Internet archive dump of errors, emails, announcements and more.Solutions are from the community.

PHP Admin SQL Advisor

Errors reported across the Internet.
Post Reply
thaterrormessage
Site Admin
Posts: 280302
Joined: Tue Jul 14, 2020 3:21 pm

PHP Admin SQL Advisor

Post by thaterrormessage »

Issue Recommendation
{long_query_time} is set to 10 seconds or more, thus only slow queries that take above 10 seconds are logged. It is suggested to set long_query_time to a lower value, depending on your environment. Usually a value of 1-5 seconds is suggested.
The slow query log is disabled. Enable slow query logging by setting slow_query_log to 'ON'. This will help troubleshooting badly performing queries.
Suboptimal caching method. You are using the MySQL Query cache with a fairly high traffic database. It might be worth considering to use memcached instead of the MySQL Query cache, especially if you have multiple slaves.
Too many sorts are causing temporary tables. Consider increasing sort_buffer_size and/or read_rnd_buffer_size, depending on your system memory limits.
There are lots of rows being sorted. While there is nothing wrong with a high amount of row sorting, you might want to make sure that the queries which require a lot of sorting use indexed columns in the ORDER BY clause, as this will result in much faster sorting.
There are too many joins without indexes. This means that joins are doing full table scans. Adding indexes for the columns being used in the join conditions will greatly speed up table joins.
The rate of reading the first index entry is high. This usually indicates frequent full index scans. Full index scans are faster than table scans but require lots of CPU cycles in big tables, if those tables that have or had high volumes of UPDATEs and DELETEs, running 'OPTIMIZE TABLE' might reduce the amount of and/or speed up full index scans. Other than that full index scans can only be reduced by rewriting queries.
The rate of reading data from a fixed position is high. This indicates that many queries need to sort results and/or do a full table scan, including join queries that do not use indexes. Add indexes where applicable.
The rate of reading the next table row is high. This indicates that many queries are doing full table scans. Add indexes where applicable.
Many temporary tables are being written to disk instead of being kept in memory. Increasing max_heap_table_size and tmp_table_size might help. However some temporary tables are always being written to disk, independent of the value of these variables. To eliminate these you will have to rewrite your queries to avoid those conditions (Within a temporary table: Presence of a BLOB or TEXT column or presence of a column bigger than 512 bytes) as mentioned in the beginning of an Article by the Pythian Group
MyISAM key buffer (index cache) % used is low. You may need to decrease the size of key_buffer_size, re-examine your tables to see if indexes have been removed, or examine queries and expectations about what indexes are being used.
The rate of opening tables is high. Opening tables requires disk I/O which is costly. Increasing table_open_cache might avoid this.
Too many table locks were not granted immediately. Optimize queries and/or use InnoDB to reduce lock wait.
The query cache is not enabled. The query cache is known to greatly improve performance if configured correctly. Enable it by setting query_cache_size to a 2 digit MiB value and setting query_cache_type to 'ON'. Note: If you are using memcached, ignore this recommendation.
Reply below - must be Registered

Hold software providers accountable! *READ COMMENTS TO FIND SOLUTIONS. We are the bible of Internet error messages - we rely on the community to acknowledge issues happening and their fixes.
Post Reply