Now that MySQL is upgraded to 8.0 RC1, let’s have a look on how we could check the workload and see if we can optimize something by adding indexes for example. The same technique can be used to find inefficient queries requiring rewriting.
The first thing we will check is some information regarding the
usage of the user used for lefred.be’s website:
mysql> select * from sys.user_summary where user= 'wp_lefred'\G *************************** 1. row *************************** user: wp_lefred statements: 65060 statement_latency: 2.71 m statement_avg_latency: 2.50 ms table_scans: 234 file_ios: 17151 file_io_latency: 54.83 s current_connections: 0 total_connections: 2541 unique_hosts: 1 current_memory: 52.27 MiB total_memory_allocated: 12.50 GiB
This was after the upgrade, so not much info yet but if I compare with the other sites hosted on the …
[Read more]