Muutke küpsiste eelistusi

Efficient MySQL Performance: Best Practices and Techniques [Pehme köide]

  • Formaat: Paperback / softback, 275 pages, kõrgus x laius: 233x178 mm
  • Ilmumisaeg: 31-Dec-2021
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1098105095
  • ISBN-13: 9781098105099
Teised raamatud teemal:
  • Pehme köide
  • Hind: 63,19 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 74,34 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 275 pages, kõrgus x laius: 233x178 mm
  • Ilmumisaeg: 31-Dec-2021
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1098105095
  • ISBN-13: 9781098105099
Teised raamatud teemal:
You'll find several books on basic or advanced MySQL performance, but nothing in between. That's because explaining MySQL performance without addressing its complexity is difficult. This practical book bridges the gap by teaching software engineers mid-level MySQL knowledge beyond the fundamentals, but well shy of deep-level internals required by database administrators (DBAs).

Daniel Nichter shows you how to apply the best practices and techniques that directly affect MySQL performance. You'll learn how to improve performance by analyzing query execution, indexing for common SQL clauses and table joins, optimizing data access, and understanding the most important MySQL metrics. You'll also discover how replication, transactions, row locking, and the cloud influence MySQL performance.

Understand why query response time is the North Star of MySQL performance Learn query metrics in detail, including aggregation, reporting, and analysis See how to index effectively for common SQL clauses and table joins Explore the most important server metrics and what they reveal about performance Dive into transactions and row locking to gain deep, actionable insight Achieve remarkable MySQL performance at any scale
Preface ix
1 Query Response Time
1(34)
A True Story of False Performance
2(1)
North Star
3(1)
Query Reporting
4(1)
Sources
4(2)
Aggregation
6(2)
Reporting
8(3)
Query Analysis
11(1)
Query Metrics
11(13)
Metadata and the Application
24(1)
Relative Values
24(1)
Average, Percentile, and Maximum
25(2)
Improving Query Response Time
27(1)
Direct Query Optimization
27(1)
Indirect Query Optimization
28(1)
When to Optimize Queries
29(1)
Performance Affects Customers
29(1)
Before and After Code Changes
29(1)
Once a Month
30(1)
MySQL: Go Faster
30(2)
Summary
32(1)
Practice: Identify Slow Queries
33(2)
2 Indexes and Indexing
35(56)
Red Herrings of Performance
37(1)
Better, Faster Hardware!
37(2)
MySQL Tuning
39(1)
MySQL Indexes: A Visual Introduction
40(1)
InnoDB Tables Are Indexes
41(4)
Table Access Methods
45(4)
Leftmost Prefix Requirement
49(2)
EXPLAIN: Query Execution Plan
51(3)
WHERE
54(6)
GROUP BY
60(5)
ORDER BY
65(6)
Covering Indexes
71(1)
Join Tables
71(9)
Indexing: How to Think Like MySQL
80(1)
Know the Query
80(1)
Understand with EXPLAIN
81(1)
Optimize the Query
82(1)
Deploy and Verify
83(1)
It Was a Good Index Until
84(1)
Queries Changed
84(1)
Excessive, Duplicate, and Unused
85(1)
Extreme Selectivity
86(1)
It's a Trap! (When MySQL Chooses Another Index)
87(1)
Table Join Algorithms
87(2)
Summary
89(1)
Practice: Find Duplicate Indexes
90(1)
3 Data
91(32)
Three Secrets
92(1)
Indexes May Not Help
92(4)
Less Data Is Better
96(1)
Less QPS Is Better
96(1)
Principle of Least Data
97(1)
Data Access
97(7)
Data Storage
104(11)
Delete or Archive Data
115(1)
Tools
115(1)
Batch Size
115(3)
Row Lock Contention
118(1)
Space and Time
118(1)
The Binary Log Paradox
119(1)
Summary
120(1)
Practice: Audit Query Data Access
121(2)
4 Access Patterns
123(28)
MySQL Does Nothing
124(1)
Performance Destabilizes at the Limit
125(5)
Toyota and Ferrari
130(1)
Data Access Patterns
131(2)
Read/Write
133(1)
Throughput
133(1)
Data Age
134(2)
Data Model
136(1)
Transaction Isolation
136(1)
Read Consistency
137(1)
Concurrency
138(1)
Row Access
139(1)
Result Set
139(1)
Application Changes
140(1)
Audit the Code
140(1)
Offload Reads
141(4)
Enqueue Writes
145(1)
Partition Data
146(1)
Dont Use MySQL
147(1)
Better, Faster Hardware?
148(2)
Summary
150(1)
Practice: Describe an Access Pattern
150(1)
5 Sharding
151(24)
Why a Single Database Does Not Scale
152(1)
Application Workload
152(3)
Benchmarks Are Synthetic
155(1)
Writes
156(1)
Schema Changes
157(1)
Operations
158(1)
Pebbles, Not Boulders
159(1)
Sharding: A Brief Introduction
160(1)
Shard Key
161(1)
Strategies
162(5)
Challenges
167(3)
Alternatives
170(1)
NewSQL
170(1)
Middleware
171(1)
Microservices
172(1)
Don't Use MySQL
172(1)
Summary
173(1)
Practice: Four-Year Fit
173(2)
6 Server Metrics
175(58)
Query Performance Versus Server Performance
177(3)
Normal and Stable: The Best Database Is a Boring Database
180(1)
Key Performance Indicators
181(1)
Field of Metrics
182(1)
Response Time
182(1)
Rate
183(1)
Utilization
183(1)
Wait
184(1)
Error
185(1)
Access Pattern
186(1)
Internal
186(1)
Spectra
187(1)
Query Response Time
188(2)
Errors
190(1)
Queries
191(5)
Threads and Connections
196(3)
Temporary Objects
199(1)
Prepared Statements
200(1)
Bad SELECT
201(1)
Network Throughput
202(1)
Replication
203(1)
Data Size
204(1)
InnoDB
205(18)
Monitoring and Alerting
223(1)
Resolution
223(2)
Wild Goose Chase (Thresholds)
225(1)
Alert on User Experience and Objective Limits
226(2)
Cause and Effect
228(2)
Summary
230(1)
Practice: Review Key Performance Indicators
231(1)
Practice: Review Alerts and Thresholds
232(1)
7 Replication Lag
233(26)
Foundation
234(1)
Source to Replica
235(2)
Binary Log Events
237(1)
Replication Lag
238(2)
Causes
240(1)
Transaction Throughput
240(1)
Post-Failure Rebuild
241(1)
Network Issues
241(1)
Risk: Data Loss
241(1)
Asynchronous Replication
242(2)
Semisynchronous Replication
244(2)
Reducing Lag: Multithreaded Replication
246(4)
Monitoring
250(2)
Recovery Time
252(2)
Summary
254(1)
Practice: Monitor Subsecond Lag
255(4)
8 Transactions
259(38)
Row Locking
260(2)
Record and Next-Key Locks
262(4)
Gap Locks
266(3)
Secondary Indexes
269(4)
Insert Intention Locks
273(3)
MVCC and the Undo Logs
276(4)
History List Length
280(2)
Common Problems
282(1)
Large Transactions (Transaction Size)
282(1)
Long-Running Transactions
283(1)
Stalled Transactions
284(1)
Abandoned Transactions
285(1)
Reporting
286(1)
Active Transactions: Latest
286(4)
Active Transactions: Summary
290(1)
Active Transaction: History
291(1)
Committed Transactions: Summary
292(2)
Summary
294(1)
Practice: Alert on History List Length
295(1)
Practice: Examine Row Locks
296(1)
9 Other Challenges
297(10)
Split-Brain Is the Greatest Risk
297(2)
Data Drift Is Real but Invisible
299(1)
Don't Trust ORM
299(1)
Schemas Always Change
300(1)
MySQL Extends Standard SQL
301(1)
Noisy Neighbors
301(1)
Applications Do Not Fail Gracefully
302(1)
High Performance MySQL Is Difficult
303(1)
Practice: Identify the Guardrails that Prevent Split-Brain
303(2)
Practice: Check for Data Drift
305(1)
Practice: Chaos
306(1)
10 MySQL in the Cloud
307(8)
Compatibility
308(2)
Management (DBA)
310(2)
Network and Storage Latency
312(1)
Performance Is Money
313(2)
Summary
315(1)
Practice: Try MySQL in the Cloud 315(2)
Index 317
Daniel Nichter is a DBA with over 15 years of experience with MySQL. He started optimizing MySQL performance in 2004 while working in a data center. Soon after, he created HackMySQL.com to share information and tools about MySQL. Daniel is most known for the tools he published during his eight-year tenure at Percona, several of which remain the de-facto standard and in use at the largest tech companies in the world. He is also a MySQL Community Award winner, conference speaker, and wide-ranging open-source contributor. Daniel currently works as a platform engineer at Square, a fintech company with thousands of MySQL servers and hundreds of software engineers.