MySQL Shell Plugins: check (part 2)

In the first part of this article related to the check plugin, we discovered information retrieved from the binary logs. This part, is about what Performance_Schema and SYS can provide us about the queries hitting the MySQL database.

Currently, 3 methods are available:

  • getSlowerQuery()
  • getQueryTempDisk()
  • getFullTableScanQuery()

The method’s name should be self explaining.

This is an overview of the parameters for each methods:

ext.check.getSlowQuery()
ext.check.getQueryTempDisk()
ext.check.getFullTableScanQuery()

Some methods allow a select parameter if only SELECT statements should be returned.

When only one query is returned (default), it’s also possible to interactively run several actions:

  • EXPLAIN (Traditional MySQL Query Execution Plan)
  • EXPLAIN FORMAT=JSON
  • EXPLAIN FORMAT=TREE
  • EXPLAIN ANALYZE

This is a video illustrating these operations:

Don’t hesitate to try those plugins and a report eventual bugs, enhancements, feature requests and your own plugins !

The github repository is https://github.com/lefred/mysqlshell-plugins

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 *

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.