高性能MySql(第2版)(英文影印版)(第19届震撼大奖(Jolt Award)获奖图书)
基本信息
- 作者: Baron Schwartz Peter Zaitsev Vadim Tkachenko Jeremy D. Zawodny Arjen Lentz Derek J. Balling
- 丛书名: 开明出版社O'REILLY系列
- 出版社:开明出版社
- ISBN:9787802057326
- 上架时间:2009-5-26
- 出版日期:2009 年4月
- 开本:16开
- 页码:684
- 版次:2-1
- 所属分类:
计算机 > 数据库 > MySQL
推荐阅读
内容简介回到顶部↑
《高性能mysql》教你如何使用mysql构建快速、可靠的系统。本书的作者都是知名专家,具有多年构建大型系统的实际经验。本书第二版涵盖了mysql性能细节并且专注于健壮性、安全性和数据完整性。.
《高性能mysql》深入讲解高级技巧从而让你能够受益于mysql的全部威力。你将学到如何设计模板、索引、查询和令性能最大化的高级mysql特性。另外,你将获得详细的指导来为你的mysql服务器、操作系统和硬件进行性能调优以便发挥它们的全部潜能。同时还包括运用实用、安全和高性能的方法来扩展你的应用,使其具有副本保存、负载均衡、高可用和失败自动切换的功能。
本书第二版进行了全面修改以及很大程度地扩展,对所有专题都进行了更有深度的覆盖。主要的新增内容包括:
·强调性能和可靠性的每一方面..
·详细涵盖搜索引擎,包括深度调优和innodb存储引擎的优化
·mysql5.0和5.1新功能的效用,包括存储过程、数据库分区、触发器和视图
·对如何使用mysql构建大型、高可扩展系统进行了详细的讨论
·备份和副本的新选项
·高级查询功能的优化,例如全文检索
·四个全新的附录
本书的内容还包括基准分析、评测报告、备份、安全性以及帮你测量、监控并管理所安装的mysql的工具和技巧。...
《高性能mysql》深入讲解高级技巧从而让你能够受益于mysql的全部威力。你将学到如何设计模板、索引、查询和令性能最大化的高级mysql特性。另外,你将获得详细的指导来为你的mysql服务器、操作系统和硬件进行性能调优以便发挥它们的全部潜能。同时还包括运用实用、安全和高性能的方法来扩展你的应用,使其具有副本保存、负载均衡、高可用和失败自动切换的功能。
本书第二版进行了全面修改以及很大程度地扩展,对所有专题都进行了更有深度的覆盖。主要的新增内容包括:
·强调性能和可靠性的每一方面..
·详细涵盖搜索引擎,包括深度调优和innodb存储引擎的优化
·mysql5.0和5.1新功能的效用,包括存储过程、数据库分区、触发器和视图
·对如何使用mysql构建大型、高可扩展系统进行了详细的讨论
·备份和副本的新选项
·高级查询功能的优化,例如全文检索
·四个全新的附录
本书的内容还包括基准分析、评测报告、备份、安全性以及帮你测量、监控并管理所安装的mysql的工具和技巧。...
目录回到顶部↑
foreword.
preface
1. mysql architecture
mysql's logical architecture
concurrency control
transactions
multiversion concurrency control
mysql's storage engines
2. finding bottlenecks: benchmarking and profiling
why benchmark?
benchmarking strategies
benchmarking tactics
benchmarking tools
benchmarking examples
profiling
operating system profiling
3. schema optimization and indexing
choosing optimal data types
indexing basics
indexing strategies for high performance
preface
1. mysql architecture
mysql's logical architecture
concurrency control
transactions
multiversion concurrency control
mysql's storage engines
2. finding bottlenecks: benchmarking and profiling
why benchmark?
benchmarking strategies
benchmarking tactics
benchmarking tools
benchmarking examples
profiling
operating system profiling
3. schema optimization and indexing
choosing optimal data types
indexing basics
indexing strategies for high performance
前言回到顶部↑
We had several goals in mind for this book. Many of them were derived from thinking about that mythical perfect MySQL book that none of us had read but that we kept looking for on bookstore shelves. Others came from a lot of experience helping other users put MySQL to work in their environments. .
We wanted a book that wasn't just a SQL primer. We wanted a book with a title that didn't start or end in some arbitrary time frame ("... in Thirty Days," "Seven Days To a Better...") and didn't talk down to the reader. Most of all, we wanted a book that would help you take your skills to the next level and build fast, reliable systems with MySQL--one that would answer questions like "How can I set up a cluster of MySQL servers capable of handling millions upon millions of queries and ensure that things keep running even if a couple of the servers die?"
We decided to write a book that focused not just on the needs of the MySQL application developer but also on the rigorous demands of the MySQL administrator, who needs to keep the system up and running no matter what the programmers or users may throw at the server. Having said that, we assume that you are already relatively experienced with MySQL and, ideally, have read an introductory book on it. We also assume some experience with general system administration, networking, and Unix-like operating systems.
This revised and expanded second edition includes deeper coverage of all the topics in the first edition and many new topics as well. This is partly a response to the changes that have taken place since the book was first published: MySQL is a much larger and more complex piece of software now. Just as importantly, its popularity has exploded. The MySQL community has grown much larger, and big corporations are now adopting MySQL for their mission-critical applications. Since the first edition, MySQL has become recognized as ready for the enterprise.People are also using it more and more in applications that are exposed to the Internet, where downtime and other problems cannot be concealed or tolerated.
As a result, this second edition has a slightly different focus than the first edition. We emphasize reliability and correctness just as much as performance, in part because we have used MySQL ourselves for applications where significant amounts of money are riding on the database server. We also have deep experience in web applications, where MySQL has become very popular. The second edition speaks to the expanded world of MySQL, which didn't exist in the same way when the first edition was written.
How This Book Is Organized
We fit a lot of complicated topics into this book. Here, we explain how we put them together in an order that makes them easier to learn.
A Broad Overview
Chapter 1, MySQL Architecture, 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 transactions. 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.
Building a Solid Foundation
The next four chapters cover material you'll find yourself referencing over and over as you use MySQL.
Chapter 2, Finding Bottlenecks: Benchmarking and Profiling, discusses the basics of benchmarking and profiling--that is, determining what sort of workload your server can handle, how fast it can perform certain tasks, and so on. You'll want to benchmark your application both before and after any major change, so you can judge how effective your changes are. What seems to be a positive change may turn out to be a negative one under real-world stress, and you'll never know what's really causing poor performance unless you measure it accurately.
In Chapter 3, Schema Optimization and Indexing, we cover the various nuances of data types, table design, and indexes. A well-designed schema helps MySQL perform much better, and many of the things we discuss in later chapters hinge on how well your application puts MySQL's indexes to work. 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.
Chapter 4, Query Performance Optimization, explains how MySQL executes queries and how you can take advantage of its query optimizer's strengths. Having a firm grasp of how the query optimizer works will do wonders for your queries and will help you understand indexes better. (Indexing and query optimization are sort of a chicken-and-egg problem; reading Chapter 3 again after you read Chapter 4 might be useful.) This chapter also presents specific examples of virtually all common classes of queries, illustrating where MySQL does a good job and how to transform queries into forms that take advantage of its strengths.
Up to this point, we've covered the basic topics that apply to any database: tables, indexes, data, and queries. Chapter 5, Advanced MySQL Features, goes beyond the basics and shows you how MySQL's advanced features work. We examine the query cache, stored procedures, triggers, character sets, and more. MySQL's implementation of these features is different from other databases, and a good understanding of them can open up new opportunities for performance gains that you might not have thought about otherwise.
Tuning Your Application
The next two chapters discuss how to make changes to improve your MySQL-based application's performance.
In Chapter 6, Optimizing Server Settings, we discuss how you can tune MySQL to make the most of your hardware and to work as well as possible for your specific application. Chapter 7, Operating System and Hardware Optimization, explains how to get the most out of your operating system and hardware. We also suggest hardware configurations that may provide better performance for larger-scale applications. Scaling Upward After Making Changes
One server isn't always enough. In Chapter 8, Replication, we discuss replication--that is, getting your data copied automatically to multiple servers. When combined with the scaling, load-balancing, and high availability lessons in Chapter 9, Scaling and High Availability, this will provide you with the groundwork for scaling your applications as large as you need them to be.
An application that runs on a large-scale MySQL backend often provides significant opportunities for optimization in the application itself. There are better and worse ways to design large applications. While this isn't the primary focus of the book, we don't want you to spend all your time concentrating on MySQL. Chapter 10, Application' Level Optimization, will help you discover the low-hanging fruit in your overall architecture, especially if it's a web application.
We wanted a book that wasn't just a SQL primer. We wanted a book with a title that didn't start or end in some arbitrary time frame ("... in Thirty Days," "Seven Days To a Better...") and didn't talk down to the reader. Most of all, we wanted a book that would help you take your skills to the next level and build fast, reliable systems with MySQL--one that would answer questions like "How can I set up a cluster of MySQL servers capable of handling millions upon millions of queries and ensure that things keep running even if a couple of the servers die?"
We decided to write a book that focused not just on the needs of the MySQL application developer but also on the rigorous demands of the MySQL administrator, who needs to keep the system up and running no matter what the programmers or users may throw at the server. Having said that, we assume that you are already relatively experienced with MySQL and, ideally, have read an introductory book on it. We also assume some experience with general system administration, networking, and Unix-like operating systems.
This revised and expanded second edition includes deeper coverage of all the topics in the first edition and many new topics as well. This is partly a response to the changes that have taken place since the book was first published: MySQL is a much larger and more complex piece of software now. Just as importantly, its popularity has exploded. The MySQL community has grown much larger, and big corporations are now adopting MySQL for their mission-critical applications. Since the first edition, MySQL has become recognized as ready for the enterprise.People are also using it more and more in applications that are exposed to the Internet, where downtime and other problems cannot be concealed or tolerated.
As a result, this second edition has a slightly different focus than the first edition. We emphasize reliability and correctness just as much as performance, in part because we have used MySQL ourselves for applications where significant amounts of money are riding on the database server. We also have deep experience in web applications, where MySQL has become very popular. The second edition speaks to the expanded world of MySQL, which didn't exist in the same way when the first edition was written.
How This Book Is Organized
We fit a lot of complicated topics into this book. Here, we explain how we put them together in an order that makes them easier to learn.
A Broad Overview
Chapter 1, MySQL Architecture, 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 transactions. 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.
Building a Solid Foundation
The next four chapters cover material you'll find yourself referencing over and over as you use MySQL.
Chapter 2, Finding Bottlenecks: Benchmarking and Profiling, discusses the basics of benchmarking and profiling--that is, determining what sort of workload your server can handle, how fast it can perform certain tasks, and so on. You'll want to benchmark your application both before and after any major change, so you can judge how effective your changes are. What seems to be a positive change may turn out to be a negative one under real-world stress, and you'll never know what's really causing poor performance unless you measure it accurately.
In Chapter 3, Schema Optimization and Indexing, we cover the various nuances of data types, table design, and indexes. A well-designed schema helps MySQL perform much better, and many of the things we discuss in later chapters hinge on how well your application puts MySQL's indexes to work. 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.
Chapter 4, Query Performance Optimization, explains how MySQL executes queries and how you can take advantage of its query optimizer's strengths. Having a firm grasp of how the query optimizer works will do wonders for your queries and will help you understand indexes better. (Indexing and query optimization are sort of a chicken-and-egg problem; reading Chapter 3 again after you read Chapter 4 might be useful.) This chapter also presents specific examples of virtually all common classes of queries, illustrating where MySQL does a good job and how to transform queries into forms that take advantage of its strengths.
Up to this point, we've covered the basic topics that apply to any database: tables, indexes, data, and queries. Chapter 5, Advanced MySQL Features, goes beyond the basics and shows you how MySQL's advanced features work. We examine the query cache, stored procedures, triggers, character sets, and more. MySQL's implementation of these features is different from other databases, and a good understanding of them can open up new opportunities for performance gains that you might not have thought about otherwise.
Tuning Your Application
The next two chapters discuss how to make changes to improve your MySQL-based application's performance.
In Chapter 6, Optimizing Server Settings, we discuss how you can tune MySQL to make the most of your hardware and to work as well as possible for your specific application. Chapter 7, Operating System and Hardware Optimization, explains how to get the most out of your operating system and hardware. We also suggest hardware configurations that may provide better performance for larger-scale applications. Scaling Upward After Making Changes
One server isn't always enough. In Chapter 8, Replication, we discuss replication--that is, getting your data copied automatically to multiple servers. When combined with the scaling, load-balancing, and high availability lessons in Chapter 9, Scaling and High Availability, this will provide you with the groundwork for scaling your applications as large as you need them to be.
An application that runs on a large-scale MySQL backend often provides significant opportunities for optimization in the application itself. There are better and worse ways to design large applications. While this isn't the primary focus of the book, we don't want you to spend all your time concentrating on MySQL. Chapter 10, Application' Level Optimization, will help you discover the low-hanging fruit in your overall architecture, especially if it's a web application.
序言回到顶部↑
I have known Peter, Vadim, and Arjen a long time and have witnessed their long history of both using MySQL for their own projects and tuning it for a lot of different high-profile customers. On his side, Baron has written client software that enhances the usability of MySQL. .
The authors' backgrounds are clearly reflected in their complete reworking in this second edition of High Performance MySQL: Optimizations, Replication, Backups, and More. It's not just a book that tells you how to optimize your work to use MySQL better than ever before. The authors have done considerable extra work, carrying out and publishing benchmark results to prove their points. This will give you the reader, a lot of valuable insight into MySQL's inner workings that you can't easily find in any other book. In turn, that will allow you to avoid a lot of mistakes in the future that can lead to suboptimal performance. ..
I recommend this book both to new users of MySQL who have played with the server a little and now are ready to write their first real applications, and to experienced users who already have well-tuned MySQL-based applications but need to get "a little more" out of them. ...
--Michael Widenius
March 2008
The authors' backgrounds are clearly reflected in their complete reworking in this second edition of High Performance MySQL: Optimizations, Replication, Backups, and More. It's not just a book that tells you how to optimize your work to use MySQL better than ever before. The authors have done considerable extra work, carrying out and publishing benchmark results to prove their points. This will give you the reader, a lot of valuable insight into MySQL's inner workings that you can't easily find in any other book. In turn, that will allow you to avoid a lot of mistakes in the future that can lead to suboptimal performance. ..
I recommend this book both to new users of MySQL who have played with the server a little and now are ready to write their first real applications, and to experienced users who already have well-tuned MySQL-based applications but need to get "a little more" out of them. ...
--Michael Widenius
March 2008
媒体评论回到顶部↑
“我向那些初涉MySQL并且现在正准备编写第一个实际应用的新手、和那些已经把基子MySQL的应用优化得不错但还需再上一层楼的有经验用,户推荐此书。”...
——MichaelWidenius,MySQL的初始开发人员
——MichaelWidenius,MySQL的初始开发人员


点击看大图






加载中...
