MySQL Shell Plugins: check (part 3)

What is great with MySQL Shell Plugins, it’s that it provides you an infinite amount of possibilities. While I was writing the part I and part II of the check plugin, I realized I could extend it event more.

The new methods I added to the plugin are especially useful when you are considering to use MySQL InnoDB Cluster in Multi-Primary mode, but not only 😉

Let’s have a look at these new methods:

These 4 new methods are targeting large queries or large transactions. It’s also possible to get the eventual hot spots.

Let’s see the first two that are more basic in action:

The first method (getQueryUpdatingSamePK()) is in fact the eventual hot spot. The second one just show the query updating the most records in the schema with the name big.

Now, let’s have a look at the other two methods that I find more interesting.

The first one, will show the transaction modifying the most records. Not the statement, but the transaction:

As you can see, the plugin provides you the which thread it was and how many rows were affected. It also provides you the possibility to see all the statements inside that transaction ! And I think this is cool !

And the last method, provides us the same behavior but for the transaction containing the biggest amount of statements:

MySQL 8.0 is really great and so is the Shell !

You can find this plugin and others on github: https://github.com/lefred/mysqlshell-plugins and don’t forget that pull requests are always welcome!

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

As MySQL Community Manager, I am an employee of Oracle and the views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

You can find articles I wrote on Oracle’s blog.