O’Reilly news

O'Reilly Releases Understanding MySQL Internals: Explore the Inner Workings of a Powerful Database

April 24, 2007

Sebastopol, CA--MySQL's source code is open in the sense of being publicly available, but unless you understand it, it's essentially closed to you. In Understanding MySQL Internals (O'Reilly, US $49.99), Sasha Pachev, a former member of the MySQL development team, provides a comprehensive tour of MySQL 5 that reveals the inner workings of this powerful database. You'll go right to the heart of MySQL to learn how data structures and convenience functions operate, how to add new storage engines and configuration options, and much more.

"I do not believe it is possible to understand and appreciate MySQL strictly through a conceptual discussion," says Pachev. "On a high conceptual level, MySQL is very simple. It does not implement many revolutionary designs. It sticks to the basics. Why is it so popular then?"

The reason, he asserts, is that what makes a good database is not so much the concepts behind it, but how well they are implemented. As important as it is to be conceptually sound, a good portion of the genius is in implementing those concepts in a way that provides a reasonable combination of good performance and ease of maintenance. "In other words, the devil is in the details," says Pachev, "and MySQL developers have done a great job of taking that devil by the horns and twisting his head off.

"Thus, in order to appreciate the inner workings of MySQL," he continues, "You need to get close to the places where that devil is being subdued."

Pachev's book will lead you into those very places. Understanding MySQL Internals begins with a brief architecture overview that explains how the different components of MySQL work together. Next, you'll learn steps for setting up a working compilable copy of the code that you can change and test at your convenience, and then you'll work with basic frameworks for adding your own configuration variables (the controls of the server) and your own storage engine.

Other sections of the book cover:

  • Core server classes, structures, and API
  • The communication protocol between the client and the server
  • Configuration variables, including a tutorial and code for adding your own
  • Thread-based request handling and how threads are used in MySQL
  • An overview of MySQL storage engines
  • The storage engine interface for integrating third-party storage engines
  • The table lock manager
  • The parser and optimizer that execute SQL commands
  • Integrating a transactional storage engine into MySQL
  • The internals of replication

With descriptions of key data structures and methods not documented in the source code, Understanding MySQL Internals offers you unprecedented opportunities to learn about the inner workings of this enterprise-proven database. Whether you're a developer, DBA, database application programmer, software vendor, or computer science student, this is your guide to discovering and improving a great database.

Sasha Pachev, a member of the MySQL development team from 2000 to 2002, was the original developer of replication in MySQL. The author of MySQL Enterprise Solutions (Wiley), he currently lives in Provo, Utah, and works as an independent consultant with an emphasis on MySQL. Sasha is also a dedicated long-distance runner and author of FastRunningBlog.com.

Additional Resources:

More information about the book, including table of contents, index, author bio, and cover graphic

Understanding MySQL Internals
Sasha Pachev
ISBN: 0-596-00957-7, 234 pages, Print: $49.99 US, $64.99 CA
1-800-998-9938; 1-707-827-7000

About O’Reilly

O’Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O’Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying “faint signals” from the alpha geeks who are creating the future. An active participant in the technology community, the company has a long history of advocacy, meme-making, and evangelism.

Email a link to this press release