高性能MySQL(影印版)
分類: 图书,计算机与互联网,数据库,MySQL,
品牌: Baron Scbwartz
基本信息·出版社:开明出版社
·页码:684 页
·出版日期:2009年
·ISBN:9787802057326
·条形码:9787802057326
·包装版本:1版
·装帧:平装
·开本:16
·正文语种:中文
产品信息有问题吗?请帮我们更新产品信息。
内容简介《高性能MYSQL》教你如何使用MySQL构建快速、可靠的系统。本书的作者都是知名专家,具有多年构建大型系统的实际经验。本书第二版涵盖了MySQL性能细节并且专注于健壮性、安全性和数据完整性。
《高性能MySQL》深入讲解高级技巧从而让你能够受益于MySQL的全部威力。你将学到如何设计模板、索引、查询和令性能最大化的高级MySQL特性。另外,你将获得详细的指导来为你的MySQL服务器、操作系统和硬件进行性能调优以便发挥它们的全部潜能。同时还包括运用实用、安全和高性能的方法来扩展你的应用,使其具有副本保存、负载均衡、高可用和失败自动切换的功能。
本书第二版进行了全面修改以及很大程度地扩展,对所有专题都进行了更有深度的覆盖。主要的新增内容包括:
* 强调性能和可靠性的每一方面
* 详细涵盖搜索引擎,包括深度调优和InnoDB存储引擎的优化
* MySQL5.0和5.1新功能的效用,包括存储过程、数据库分区、触发器和视图
* 对如何使用MySQL构建大型、高可扩展系统进行了详细的讨论
* 备份和副本的新选项
* 高级查询功能的优化,例如全文检索
* 四个全新的附录
本书的内容还包括基准分析、评测报告、备份、安全性以及帮你测量、监控并管理所安装的MySQL的工具和技巧。
媒体推荐“我向那些初涉MySQL并且现在正准备编写第一个实际应用的新手、和那些已经把基于MySQL的应用优化得不错但还需再上一层楼的有经验用户推荐此书。”
——Michael Widenius,MySQL的初始开发人员
编辑推荐《高性能MYSQL》:O'Reilly Media,Inc.是世界上在UNIX、X、Internet和其他开放系统图书领域具有领导地位的出版公司,同时是联机出版的先锋。从最畅销的《The Whole Internet User's Guide & Catalog》(被纽约公共图书馆评为二十世纪最重要的50本书之一)到GNN(最早的Internet门户和商业网站),再到WebSite(第一个桌面PC的Web服务器软件),O'Reilly Meida,Inc.一直处于Internet发展的最前沿。O'Reilly已经出版了200多种图书,200多位员工分布在世界各地,O'Reilly是最稳定的计算机图书出版商——每一本书都一版再版。与大多数计算机图书出版商相比,我们在计算机专业方面具有强烈的背景,这使O'Reilly形成了一个非常不同于其他出版商的出版方针。O'Reilly所有的编辑人员以前都是程序员,或者是顶尖级的技术专家,O'Reilly还有许多固定的作者群体——他们曾是咨询专家,而现在编写著作,我们依靠他们准时地推出图书。因为我们紧密地与计算机业界联系着,所以O'Reilly知道市场上真正需要什么图书。
O'Reilly是全世界有名的计算机图书出版公司,图书通俗易懂,影印版没有改动任何原书中的内容,将O'Reilly图书最真实的放在读者面前,相信对于需要的人来说这是一个至宝。
我想推荐这本书,因为它对ASP.NET最常用的知识和技能进行了很棒的讲解。读者通读全书,将会碰到他们在创建小型动态网站时可能面临的所有任务。”
——Mike Pope,微软用户教育
目录
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
An Indexing Case Study
Index and Table Maintenance
Normalization and Denormalization
Speeding Up ALTER TABLE
Notes on Storage Engines
4. Query Performance Optimization
Slow Query Basics: Optimize Data Access
Ways to Restructure Queries
Query Execution Basics
Limitations of the MySQL Query Optimizer
Optimizing Specific Types of Queries
Query Optimizer Hints
User-Defined Variables
5. Advanced MySQL Features
The MySQL Query Cache
Storing Code Inside MySQL
Cursors
Prepared Statements
User-Defined Functions
Views
Character Sets and Collations
Full-Text Searching
Foreign Key Constraints
Merge Tables and Partitioning
Distributed (XA) Transactions
6. Optimizing Server Settings
Configuration Basics
General Tuning
Tuning MySQL's I/O Behavior
Tuning MySQL Concurrency
Workload-Based Tuning
Tuning Per-Connection Settings
7. Operating System and Hardware Optimization
What Limits MySQL's Performance?
How to Select CPUs for MySQL
Balancing Memory and Disk Resources
Choosing Hardware for a Slave
RAID Performance Optimization
Storage Area Networks and Network-Attached Storage
Using Multiple Disk Volumes
Network Configuration
Choosing an Operating System
Choosing a Filesystem
Threading
Swapping
Operating System Status..
8. Replication
Replication Overview
Setting Up Replication
Replication Under the Hood
Replication Topologies
Replication and Capacity Planning
Replication Administration and Maintenance
Replication Problems and Solutions
How Fast Is Replication?
The Future of MySQL Replication
9. Scaling and High Availability
Terminology
Scaling MySQL
Load Balancing
High Availability
10. Application-Level Optimization
Application Performance Overview
Web Server Issues
Caching
Extending MySQL
Alternatives to MySQL
11. Backupand Recovery
Overview
Considerations and Tradeoffs
Managing and Backing Up Binary Logs
Backing Up Data
Recovering from a Backup
Backup and Recovery Speed
Backup Tools
Scripting Backups
12. Security
Terminology
Account Basics
Operating System Security
Network Security
Data Encryption
MySQL in a chrooted Environment
13. MySQL Server Status
System Variables
SHOW STATUS
SHOW INNODB STATUS
SHOW PROCESSLIST
SHOW MUTEX STATUS
Replication Status
INFORMATION_SCHEMA
14. Tools for High Performance
Interface Tools
Monitoring Tools
Analysis Tools
MySQL Utilities
Sources of Further Information
A. Transferring Large Files
B. Using EXPLAIN
C. Using Sphinx with MySQL
D. Debugging Locks
Index
……[看更多目录]
序言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
文摘插图:
At some point, you're bound to need more performance from MySQL. But what should you try to improve? A particular query? Your schema? Your hardware? The only way to know is to measure what your system is doing, and test its performance under various conditions. That's why we put this chapter early in the book.
The best strategy is to find and strengthen the weakest link in your application's chain of components. This is especially useful if you don't know what prevents bet ter performance——or what will prevent better performance in the future.
Benchmarking and profiling are two essential practices for finding bottlenecks. They are related, hut they're not the same. A benchmark measures your system's performance. This can help determine a system's capacity, show you which changes mat ter and which don't, or show how your application performs with different data. In contrast, profiling helps you find where your application spends the most time or consumes the most resources. In other words, benchmarking answers the question "How well does this perform?" and profiling answers the question "Why does it perform the way it does?"
We've arranged this chapter in two parts, the first about bencbmarking and the second about profiling. We begin with a discussion of reasons and strategies for benchmarking, then move on to specific benchmarking tactics. We show you how to plan and design benchmarks, design for accurate results, run benchmarks, and analyze the results. We end the first part with a look at benchmarking tools and examples of how to use several of them.
The rest of the chapter shows how to profile both applications and MySQL. We show detailed examples of real-life profiling code we've used in production to help analyze application performance. We also show you how to log MySQL's queries, analyze the logs, and use MySQL's status counters and other tools to see what MySQL and your quer
……[看更多书摘]