Skip to Content
High Performance MySQL
book

High Performance MySQL

by Jeremy D. Zawodny, Derek J. Balling
April 2004
Intermediate to advanced
294 pages
8h 19m
English
O'Reilly Media, Inc.
Content preview from High Performance MySQL

Appendix B. mytop

This appendix is a basic reference for Version 1.4 of mytop, a tool you can use to monitor various aspects of MySQL. mytop began as a simple Perl script that Jeremy wrote back in 2000 after getting sick of repeatedly running SHOW FULL PROCESSLIST and SHOW STATUS in an attempt to get a handle on what a MySQL was doing. After a bit of hacking on it, he realized that it would be useful it the tool felt a bit like the Unix top utility. Since then it has evolved to become quite a bit more popular and powerful. It is especially useful when tracking down problematic queries or trying to figure out what’s keeping your server so busy.

mytop is an evolving piece of software. Be sure to check the mytop web site (http://jeremy.zawodny.com/mysql/mytop/) for mytop news, downloads, and information about the mailing list. It’s likely that new features have been added since Version 1.4.

Note that when discussing “queries” in this chapter (and many other places in the book), we’re doing so in a general sense: SELECT, INSERT, UPDATE, and DELETE.

Overview

mytop does much of the hard work involved in summarizing MySQL performance data. There are three primary display modes in mytop. The default, thread view (or top view), closely resembles the Unix top command, as seen in Figure B-1. It produces a multiline summary at the top of the screen followed by a listing of threads in MySQL. The command view aggregates the data from MySQL’s Com_* command counters (see Appendix A), as seen in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

High Performance MySQL, 2nd Edition

High Performance MySQL, 2nd Edition

Jeremy D. Zawodny, Derek J. Balling, Baron Schwartz, Peter Zaitsev, Arjen Lentz, Vadim Tkachenko
High Performance MySQL, 3rd Edition

High Performance MySQL, 3rd Edition

Baron Schwartz, Peter Zaitsev, Vadim Tkachenko
Advanced MySQL 8

Advanced MySQL 8

Eric Vanier, Birju Shah, Tejaswi Malepati

Publisher Resources

ISBN: 0596003064Errata Page