A Broad Overview
Chapter 1, MySQL Architecture and History is dedicated to the basics—things you’ll
need to be familiar with before you dig in deeply. You need to understand how MySQL
is organized before you’ll be able to use it effectively. This chapter explains MySQL’s
architecture and key facts about its storage engines. It helps you get up to speed if you
aren’t familiar with some of the fundamentals of a relational database, including trans-
actions. This chapter will also be useful if this book is your introduction to MySQL but
you’re already familiar with another database, such as Oracle. We also include a bit of
historical context: the changes to MySQL over time, recent ownership changes, and
where we think it’s headed.
Building a Solid Foundation
The early chapters cover material we hope you’ll reference over and over as you use
MySQL.
Chapter 2, Benchmarking MySQL discusses the basics of benchmarking—that is, de-
termining what sort of workload your server can handle, how fast it can perform certain
tasks, and so on. Benchmarking is an essential skill for evaluating how the server be-
haves under load, but it’s also important to know when it’s not useful.
Chapter 3, Profiling Server Performance introduces you to the response time–oriented
approach we take to troubleshooting and diagnosing server performance problems.
This framework has proven essential to solving some of the most puzzling cases we’ve
seen. Although you might choose to modify our approach (we developed it by modi-
fying Cary Millsap’s approach, after all), we hope you’ll avoid the pitfalls of not having
any method at all.
In Chapters 4 through 6, we introduce three topics that together form the foundation
for a good logical and physical database design. In Chapter 4, Optimizing Schema and
Data Types, we cover the various nuances of data types and table design. Chapter 5,
Indexing for High Performance extends the discussion to indexes—that is, physical
database design. A firm understanding of indexes and how to use them well is essential
for using MySQL effectively, so you’ll probably find yourself returning to this chapter
repeatedly. And Chapter 6, Query Performance Optimization wraps the topics together
by explaining how MySQL executes queries and how you can take advantage of its
query optimizer’s strengths. This chapter also presents specific examples of many com-
mon classes of queries, illustrating where MySQL does a good job and how to transform
queries into forms that use its strengths.
Up to this point, we’ve covered the basic topics that apply to any database: tables,
indexes, data, and queries. Chapter 7, Advanced MySQL Features goes beyond the
basics and shows you how MySQL’s advanced features work. We examine topics such
as partitioning, stored procedures, triggers, and character sets. MySQL’s implementa-
tion of these features is different from other databases, and a good understanding of
xviii | Preface