---

Simple Automation – Examining your MySQL Index Usage

“In the majority of MySQL systems, the schema is always updated
and changed based on the needs and focus of the application, making
it somewhat difficult to keep up with all of the changes that come
down the pipe. Chris Schneider shows you how to gauge the index
usage in a system, using grep, awk and sed.

“Knowing how to index a schema based on the queries using the
system is a great skill to have. In the majority of the systems I
have worked on, the schema is always updated and changed based on
the needs and focus of the application. That said, it can be
somewhat difficult to keep up with all of the changes that come
down the pipe, especially if there are many changes every week. To
help identify the indexes that are being used there are a few tools
out there to help. One of the best resides in the MAAKIT called,
mk-index-usage.

“Unfortunately, I was working with an older version of the
Maatkit and didn’t realize that this tool had already been created
then added to the already stellar Maatkit. In this article, I will
go through the process that I used to gauge the index usage in a
system I stepped into in my current position. I thought this might
be a good way to show that using grep, awk and sed can be very
helpful with just about anything.”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis