Muutke küpsiste eelistusi

E-raamat: High Performance MySQL: Proven Strategies for Operating at Scale

  • Formaat: 388 pages
  • Ilmumisaeg: 18-Oct-2021
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781492080466
  • Formaat - EPUB+DRM
  • Hind: 47,96 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 388 pages
  • Ilmumisaeg: 18-Oct-2021
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781492080466

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

How can you realize MySQL's full power? With High Performance MySQL, you'll learn advanced techniques for everything from setting service-level objectives to designing schemas, indexes, and queries to tuning your server, operating system, and hardware to achieve your platform's full potential. This guide also teaches database administrators safe and practical ways to scale applications through replication, load balancing, high availability, and failover.

Updated to reflect recent advances in cloud- and self-hosted MySQL, InnoDB performance, and new features and tools, this revised edition helps you design a relational data platform that will scale with your business. You'll learn best practices for database security along with hard-earned lessons in both performance and database stability.

  • Dive into MySQL's architecture, including key facts about its storage engines
  • Learn how server configuration works with your hardware and deployment choices
  • Make query performance part of your software delivery process
  • Examine enhancements to MySQL's replication and high availability
  • Compare different MySQL offerings in managed cloud environments
  • Explore MySQL's full stack optimization from application-side configuration to server tuning
  • Turn traditional database management tasks into automated processes
Foreword xiii
Preface xv
1 MySQL Architecture
1(18)
MySQL's Logical Architecture
1(1)
Connection Management and Security
2(1)
Optimization and Execution
3(1)
Concurrency Control
3(1)
Read/Write Locks
4(1)
Lock Granularity
4(2)
Transactions
6(2)
Isolation Levels
8(1)
Deadlocks
9(1)
Transaction Logging
10(1)
Transactions in MySQL
11(2)
Multiversion Concurrency Control
13(2)
Replication
15(1)
Datafiles Structure
16(1)
The InnoDB Engine
16(1)
JSON Document Support
17(1)
Data Dictionary Changes
17(1)
Atomic DDL
18(1)
Summary
18(1)
2 Monitoring in a Reliability Engineering World
19(22)
The Impact of Reliability Engineering on DBA Teams
20(1)
Defining Service Level Goals
20(2)
What Does It Take to Make Customers Happy?
22(1)
What to Measure
23(1)
Defining SLIs and SLOs
23(1)
Monitoring Solutions
24(1)
Monitoring Availability
25(2)
Monitoring Query Latency
27(1)
Monitoring for Errors
27(2)
Proactive Monitoring
29(7)
Measuring Long-Term Performance
36(1)
Learning Your Business Cadence
36(1)
Tracking Your Metrics Effectively
37(1)
Using Monitoring Tools to Inspect the Performance
37(1)
Using SLOs to Guide Your Overall Architecture
38(1)
Summary
39(2)
3 Performance Schema
41(34)
Introduction to Performance Schema
41(1)
Instrument Elements
42(2)
Consumer Organization
44(1)
Resource Consumption
45(1)
Limitations
46(1)
Sys Schema
46(1)
Understanding Threads
46(2)
Configuration
48(1)
Enabling and Disabling Performance Schema
48(1)
Enabling and Disabling Instruments
48(2)
Enabling and Disabling Consumers
50(1)
Tuning Monitoring for Specific Objects
51(1)
Tuning Threads Monitoring
51(1)
Adjusting Memory Size for Performance Schema
52(1)
Defaults
53(1)
Using Performance Schema
53(1)
Examining SQL Statements
53(9)
Examining Read Versus Write Performance
62(1)
Examining Metadata Locks
63(1)
Examining Memory Usage
64(2)
Examining Variables
66(4)
Examining Most Frequent Errors
70(1)
Examining Performance Schema Itself
71(2)
Summary
73(2)
4 Operating System and Hardware Optimization
75(24)
What Limits MySQL's Performance?
75(1)
How to Select CPUs for MySQL
76(1)
Balancing Memory and Disk Resources
76(1)
Caching, Reads, and Writes
76(1)
What's Your Working Set?
77(1)
Solid-State Storage
78(1)
An Overview of Flash Memory
78(1)
Garbage Collection
79(1)
RAID Performance Optimization
79(2)
RAID Failure, Recovery, and Monitoring
81(2)
RAID Configuration and Caching
83(3)
Network Configuration
86(1)
Choosing a Filesystem
87(2)
Choosing a Disk Queue Scheduler
89(1)
Memory and Swapping
90(2)
Operating System Status
92(3)
Other Helpful Tools
95(1)
Summary
96(3)
5 Optimizing Server Settings
99(26)
How MySQL's Configuration Works
100(1)
Syntax, Scope, and Dynamism
101(2)
Persisted System Variables
103(1)
Side Effects of Setting Variables
103(1)
Planning Your Variable Changes
104(1)
What Not to Do
105(1)
Creating a MySQL Configuration File
106(1)
Minimal Configuration
107(1)
Inspecting MySQL Server Status Variables
108(1)
Configuring Memory Usage
109(1)
Per-Connection Memory Needs
109(1)
Reserving Memory for the Operating System
109(1)
The InnoDB Buffer Pool
110(1)
The Thread Cache
111(1)
Configuring MySQL's I/O Behavior
112(1)
The InnoDB Transaction Log
113(1)
Log Buffer
113(2)
The InnoDB Tablespace
115(3)
Other I/O Configuration Options
118(1)
Configuring MySQL Concurrency
119(1)
Safety Settings
120(2)
Advanced InnoDB Settings
122(2)
Summary
124(1)
6 Schema Design and Management
125(30)
Choosing Optimal Data Types
126(1)
Whole Numbers
127(1)
Real Numbers
127(1)
String Types
128(7)
Date and Time Types
135(1)
Bit-Packed Data Types
136(3)
JSON Data
139(3)
Choosing Identifiers
142(2)
Special Types of Data
144(1)
Schema Design Gotchas in MySQL
145(1)
Too Many Columns
145(1)
Too Many Joins
145(1)
The All-Powerful ENUM
145(1)
The ENUM in Disguise
146(1)
NULL Not Invented Here
146(1)
Schema Management
146(1)
Schema Management as Part of the Data Store Platform
147(7)
Summary
154(1)
7 Indexing for High Performance
155(36)
Indexing Basics
156(1)
Types of Indexes
156(5)
Benefits of Indexes
161(1)
Indexing Strategies for High Performance
162(1)
Prefix Indexes and Index Selectivity
162(3)
Multicolumn Indexes
165(2)
Choosing a Good Column Order
167(3)
Clustered Indexes
170(8)
Covering Indexes
178(2)
Using Index Scans for Sorts
180(2)
Redundant and Duplicate Indexes
182(3)
Unused Indexes
185(1)
Index and Table Maintenance
186(1)
Finding and Repairing Table Corruption
186(1)
Updating Index Statistics
187(1)
Reducing Index and Data Fragmentation
188(1)
Summary
189(2)
8 Query Performance Optimization
191(36)
Why Are Queries Slow?
191(1)
Slow Query Basics: Optimize Data Access
192(1)
Are You Asking the Database for Data You Don't Need?
192(2)
Is MySQL Examining Too Much Data?
194(4)
Ways to Restructure Queries
198(1)
Complex Queries Versus Many Queries
198(1)
Chopping Up a Query
199(1)
Join Decomposition
200(1)
Query Execution Basics
201(1)
The MySQL Client/Server Protocol
202(2)
Query States
204(1)
The Query Optimization Process
205(12)
The Query Execution Engine
217(1)
Returning Results to the Client
218(1)
Limitations of the MySQL Query Optimizer
219(1)
UNION Limitations
219(1)
Equality Propagation
220(1)
Parallel Execution
220(1)
SELECT and UPDATE on the Same Table
220(1)
Optimizing Specific Types of Queries
221(1)
Optimizing COUNT() Queries
221(2)
Optimizing JOIN Queries
223(1)
Optimizing GROUP BY with ROLLUP
223(1)
Optimizing LIMIT and OFFSET
223(2)
Optimizing SQL CALC FOUND ROWS
225(1)
Optimizing UNION
225(1)
Summary
226(1)
9 Replication
227(30)
Replication Overview
227(2)
How Replication Works
229(1)
Replication Under the Hood
230(1)
Choosing Replication Format
230(1)
Global Transaction Identifiers
231(1)
Making Replication Crash Safe
232(1)
Delayed Replication
233(1)
Multithreaded Replication
234(3)
Semisynchronous Replication
237(1)
Replication Filters
237(2)
Replication Failover
239(1)
Planned Promotions
239(1)
Unplanned Promotions
240(1)
Trade-Offs of Promotion
240(1)
Replication Topologies
241(1)
Active/Passive
241(1)
Active/Read Pool
242(2)
Discouraged Topologies
244(3)
Replication Administration and Maintenance
247(1)
Monitoring Replication
247(1)
Measuring Replication Lag
248(1)
Determining Whether Replicas Are Consistent with the Source
249(2)
Replication Problems and Solutions
251(1)
Binary Logs Corrupted on the Source
251(1)
Nonunique Server IDs
251(1)
Undefined Server IDs
252(1)
Missing Temporary Tables
252(1)
Not Replicating All Updates
252(1)
Excessive Replication Lag
252(2)
Oversized Packets from the Source
254(1)
No Disk Space
254(1)
Replication Limitations
254(1)
Summary
255(2)
10 Backup and Recovery
257(30)
Why Backups?
258(1)
Defining Recovery Requirements
259(1)
Designing a MySQL Backup Solution
260(1)
Online or Offline Backups?
261(2)
Logical or Raw Backups?
263(2)
What to Back Up
265(1)
Incremental and Differential Backups
266(2)
Replication
268(1)
Managing and Backing Up Binary Logs
269(1)
Backup and Recovery Tools
269(1)
MySQL Enterprise Backup
269(1)
Percona XtraBackup
270(1)
mydumper
270(1)
mysqldump
270(1)
Backing Up Data
270(1)
Logical SQL Backups
270(2)
Filesystem Snapshots
272(6)
Percona XtraBackup
278(3)
Recovering from a Backup
281(1)
Restoring Logical Backups
282(1)
Restoring Raw Files from Snapshot
283(1)
Restoring with Percona XtraBackup
284(1)
Starting MySQL After Restoring Raw Files
285(1)
Summary
286(1)
11 Scaling MySQL
287(26)
What Is Scaling?
287(2)
Read-Versus Write-Bound Workloads
289(1)
Understanding Your Workload
289(1)
Read-Bound Workloads
290(1)
Write-Bound Workloads
291(1)
Functional Sharding
291(1)
Scaling Reads with Read Pools
292(2)
Managing Configuration for Read Pools
294(1)
Health Checks for Read Pools
295(2)
Choosing a Load-Balancing Algorithm
297(1)
Queuing
298(1)
Scaling Writes with Sharding
299(1)
Choosing a Partitioning Scheme
300(2)
Multiple Partitioning Keys
302(1)
Querying Across Shards
302(1)
Vitess
303(3)
ProxySQL
306(5)
Summary
311(2)
12 MySQL in the Cloud
313(12)
Managed MySQL
313(1)
Amazon Aurora for MySQL
314(3)
GCP Cloud SQL
317(1)
MySQL on Virtual Machines
318(1)
Machine Types in Cloud
318(1)
Choosing the Right Machine Type
319(1)
Choosing the Right Disk Type
320(2)
Additional Tips
322(2)
Summary
324(1)
13 Compliance with MySQL
325(18)
What Is Compliance?
326(1)
Service Organization Controls Type 2
326(1)
Sarbanes-Oxley Act
326(1)
Payment Card Industry Data Security Standard
327(1)
Health Insurance Portability and Accountability Act
327(1)
Federal Risk and Authorization Management Program
327(1)
General Data Protection Regulation
327(1)
Schrems II
328(1)
Building for Compliance Controls
328(1)
Secrets Management
329(3)
Separation of Roles and Data
332(1)
Tracking Changes
333(6)
Backup and Restore Procedures
339(2)
Summary
341(2)
A Upgrading MySQL 343(6)
B MySQL on Kubernetes 349(4)
Index 353
Silvia Botros is a Senior Principal Engineer at Twilio. During her time at SendGrid, she helped deploy and maintain various MySQL datastores that support the mail pipeline and other products that SendGrid offers and to drive MySQL designs from inception to production.

Jeremy Tinley is a Senior Staff Engineer at Etsy, with over 20 years of MySQL experience. Throughout his career, he has managed tens of thousands of MySQL instances with an eye towards availability, reliability, and operational efficiency.