MySQL Shell Plugins: check (part 2)

on

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

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.

recent
categories