Skip to main content
CF

MySQL High Performance Tuning Guide

2h 49m 22s
English
Paid

Master MySQL Performance Tuning and learn to prevent potential performance pitfalls. Discover how MySQL optimizes and executes queries efficiently for a high-performance database experience.

Understanding MySQL Architecture

  • Explore the steps involved in Query Execution.
  • Learn how the Client/Server Protocol influences MySQL.
  • Gain insights into the workings of the Query Optimizer.
  • Understand the unique role of the Storage Engine Layer in MySQL.

Identifying Queries for Optimization

  • Utilize the Performance Schema to identify optimization opportunities by analyzing time consumption.
  • Focus on the most impactful queries instead of the top 1000, which might not be worth optimizing.
  • Extract meaningful insights from the extensive performance views and metrics available in MySQL.
  • Recognize that UPDATE and DELETE statements impact I/O and response time due to their read operations.

Efficient Query Analysis

  • Understand the importance of a query plan for each request.
  • Learn to interpret query plans and the function of each node type in MySQL.
  • Use examples to demonstrate how the EXPLAIN output highlights query performance issues.
  • Identify key indicators that point to performance bottlenecks.

The Clustered Index and Primary Key Selection

  • Understand the impact of primary index choice on MySQL's index-organized tables.
  • See how the primary key affects I/O patterns, secondary index sizes, and buffer pool loading.
  • Learn why an optimal primary key should be compact, sequentially increasing, and efficiently organized.

Indexing for Performance Success

  • Explore the primary functions of an index for optimizing queries.
  • Distinguish which tables benefit from indexing and which do not.
  • Understand how MySQL utilizes statistics to select the best index and how you can influence its decisions.

Optimizing with Composite Indexes

  • Avoid common mistakes when using composite indexes.
  • Determine the optimal column order for multicolumn indexes.
  • Make informed decisions about index selection based on understanding rather than general rules.
  • Recognize when Redundant Indexes can be beneficial and when to avoid them.
  • Conduct benchmarks to quantify performance improvements.

Configuring MySQL Server for Optimal Performance

  • Adopt best practices for implementing MySQL configuration changes for tuning.
  • Identify three configuration options that may benefit from non-default values and learn how to optimize them.
  • Review the data lifecycle in InnoDB to inform configuration decisions.
  • Adjust critical parameters for specific use-cases, such as buffer pool instances and parallel execution.

MySQL Transactions and Lock Management

  • Ensure data integrity with transactions, while minimizing performance impacts.
  • Understand why locks are necessary and explore ways to reduce their negative effects.
  • Leverage indexes, transaction splitting, and isolation levels to decrease lock contention.
  • Utilize monitoring tools and reporting tables to identify and troubleshoot lock issues.

Scaling MySQL for Growth

  • Explore the concept of scaling MySQL and the various dimensions involved in scaling.
  • Learn strategies for scaling different types of loads effectively.
  • Implement Replication, utilize Read-Pools, conduct Health Checks, and engage in Service Discovery.
  • Identify key considerations and challenges in Sharding the database.
  • Discover benefits and scenarios for Partitioning data in MySQL.
  • Evaluate the use cases and advantages of using a Queue.
  • Understand fundamental principles for scaling writes with sharding solutions.

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 70 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 70 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Query Execution Basics
All Course Lessons (70)
#Lesson TitleDurationAccess
1
Query Execution Basics Demo
02:02
2
Utility Layer
02:33
3
SQL Layer
04:26
4
Storage Engine Layer
02:03
5
Conclusions
00:30
6
Making use of Performance Schema
04:11
7
Top 10 Time-Consuming Queries
03:33
8
Why Are Queries Slow?
01:30
9
Finding Candidate Queries for Optimization
02:37
10
Table I/O and File I/O for Selects
01:45
11
Table I/O and File I/O for Updates and Deletes
03:34
12
The Error Summary Tables
01:41
13
Conclusions
00:37
14
How does the Optimiser work?
02:12
15
EXPLAIN basics
01:34
16
Example 1: Single Table, Table Scan
02:36
17
EXPLAIN ANALYZE
01:13
18
Example 2: Single Table, Index Access
00:43
19
Example 3: Multicolumn Index
00:59
20
Example 4: Two Tables With Subquery And Sorting
01:55
21
Spotting jumps in runtime
04:42
22
Hot and cold cache behaviour
00:51
23
Conclusions
00:39
24
Section Overview
00:53
25
The Clustered Indexes
01:02
26
Choosing a Good Primary Key
03:44
27
Use Case: Inserting rows in primary key order with InnoDB
05:04
28
Optimal Primary Key in Practice
01:42
29
Introduction
04:37
30
Why add a Secondary Index?
03:47
31
When should you Add or Remove Indexes?
02:14
32
Why Index Statistics are Important?
02:07
33
How to help MySQL make better decisions?
04:22
34
Covering Indexes
03:38
35
Motivation
01:52
36
Columns Order
02:00
37
Composite Index Hands-on
05:07
38
Using Redundant Indexes
04:53
39
Composite Indexes Extra Remarks
01:52
40
Conclusions
00:31
41
Configuration Best Practices
04:44
42
InnoDB Overview
02:56
43
Adjusting the Buffer Pool Size
03:49
44
Adding more Buffer Pool Instances
02:06
45
Why Dumping the Buffer Pool?
01:09
46
Tuning Flushing Pages Process
02:47
47
Tuning Redo Log Buffer
01:51
48
Tuning Redo Log Files
03:03
49
Parallel Query Execution
01:29
50
Adjusting the Query Buffers
02:00
51
Conclusions
00:56
52
Impact of Transactions
01:07
53
Managing Locks
03:45
54
Purpose of Undo Logs
02:22
55
Reduce Locking - Transaction size and age
02:02
56
Reduce Locking - Indexes
01:48
57
Reduce Locking - Transaction Isolation Levels
03:51
58
Monitoring Transactions
01:46
59
Monitoring Locks
00:48
60
Conclusions
00:58
61
Scaling MySQL Intro
00:50
62
Read Versus Write Loads
02:31
63
Replication - Scaling Reads with Read Pools
03:38
64
Replication - Service Discovery for Read Pools
02:23
65
Queuing
02:36
66
Sharding Introduction
03:28
67
Sharding Concerns
04:06
68
How to Partition Data in MySQL
03:16
69
Multiple Partitioning Keys
01:57
70
Querying Across Shards
01:29
Unlock unlimited learning

Get instant access to all 69 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What prerequisites are required for this course?
Before enrolling in the MySQL High Performance Tuning Guide, students should have a basic understanding of MySQL operations and general database concepts. Familiarity with SQL queries and some experience with MySQL databases will be beneficial. The course assumes that students can navigate and perform basic operations in MySQL, as it focuses on advanced tuning and optimization techniques.
What will I learn about MySQL architecture in this course?
The course covers several aspects of MySQL architecture, including the steps involved in query execution and the influence of the Client/Server Protocol. Students will gain insights into the workings of the Query Optimizer and understand the unique role of the Storage Engine Layer in MySQL. This foundational knowledge helps in understanding how MySQL processes and executes queries, which is crucial for effective performance tuning.
How does this course help in identifying queries for optimization?
Students will learn to utilize the Performance Schema to identify optimization opportunities by analyzing time consumption. The course emphasizes focusing on the most impactful queries rather than the top 1000, which might not be worth optimizing. By extracting meaningful insights from MySQL's performance views and metrics, students can recognize that UPDATE and DELETE statements impact I/O and response time due to their read operations.
What specific tools will I learn to use during the course?
The course includes practical lessons on using the EXPLAIN command to interpret query plans and identify performance issues. Students will explore examples that demonstrate how the EXPLAIN output highlights query performance problems. Additionally, they will learn to use the Performance Schema to analyze time consumption and identify queries that need optimization.
What topics are not covered in this course?
While the course provides a comprehensive guide to MySQL performance tuning, it does not cover basic MySQL operations or beginner-level SQL query writing. The focus is specifically on advanced topics related to query optimization, MySQL architecture, and performance analysis, assuming that students already have a foundational knowledge of MySQL.
How does this course compare to other MySQL optimization courses?
This course offers a detailed exploration of MySQL performance tuning, with a focus on query execution, the role of the Query Optimizer, and the impact of primary key selection on performance. It distinguishes itself by emphasizing practical applications such as using the Performance Schema and analyzing EXPLAIN outputs, which may not be covered as extensively in other courses.
What is the time commitment for completing this course?
The course consists of 70 lessons. Although the total runtime is not specified, students should expect to spend additional time on practical exercises and reviewing course materials to fully understand the concepts presented. Given the depth of topics such as query optimization and MySQL architecture, allocating time for practice and experimentation is recommended for the best learning outcomes.