Skip to main content
  • Book
  • © 2020

MySQL 8 Query Performance Tuning

A Systematic Method for Improving Execution Speeds

Apress
  • Helps you delight users through improved execution speeds

  • Includes the use of Visual Explain—a graphical approach to query analysis

  • Teaches the full cycle from finding candidate queries to improving their performance

Buy it now

Buying options

eBook USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (27 chapters)

  1. Front Matter

    Pages i-xxxvii
  2. Getting Started

    1. Front Matter

      Pages 1-1
    2. MySQL Performance Tuning

      • Jesper Wisborg Krogh
      Pages 3-8
    3. Query Tuning Methodology

      • Jesper Wisborg Krogh
      Pages 9-17
    4. Benchmarking with Sysbench

      • Jesper Wisborg Krogh
      Pages 19-53
    5. Test Data

      • Jesper Wisborg Krogh
      Pages 55-73
  3. Sources of Information

    1. Front Matter

      Pages 75-75
    2. The Performance Schema

      • Jesper Wisborg Krogh
      Pages 77-100
    3. The sys Schema

      • Jesper Wisborg Krogh
      Pages 101-110
    4. The Information Schema

      • Jesper Wisborg Krogh
      Pages 111-131
    5. SHOW Statements

      • Jesper Wisborg Krogh
      Pages 133-151
    6. The Slow Query Log

      • Jesper Wisborg Krogh
      Pages 153-164
  4. Tools

    1. Front Matter

      Pages 165-165
    2. MySQL Enterprise Monitor

      • Jesper Wisborg Krogh
      Pages 167-197
    3. MySQL Workbench

      • Jesper Wisborg Krogh
      Pages 199-226
    4. MySQL Shell

      • Jesper Wisborg Krogh
      Pages 227-271
  5. Schema Considerations and the Query Optimizer

    1. Front Matter

      Pages 273-273
    2. Data Types

      • Jesper Wisborg Krogh
      Pages 275-296
    3. Indexes

      • Jesper Wisborg Krogh
      Pages 297-345
    4. Index Statistics

      • Jesper Wisborg Krogh
      Pages 347-384

About this book

Identify, analyze, and improve poorly performing queries that damage user experience and lead to lost revenue for your business. This book will help you make query tuning an integral part of your daily routine through a multi-step process that includes monitoring of execution times, identifying candidate queries for optimization, analyzing their current performance, and improving them to deliver results faster and with less overhead. Author Jesper Krogh systematically discusses each of these steps along with the data sources and the tools used to perform them. 
MySQL 8 Query Performance Tuning aims to help you improve query performance using a wide range of strategies. You will know how to analyze queries using both the traditional EXPLAIN command as well as the new EXPLAIN ANALYZE tool. You also will see how to use the Visual Explain feature to provide a visually-oriented view of an execution plan. Coverage of indexes includes indexing strategies and index statistics, and you will learn how histograms can be used to provide input on skewed data distributions that the optimizer can use to improve query performance. You will learn about locks, and how to investigate locking issues. And you will come away with an understanding of how the MySQL optimizer works, including the new hash join algorithm, and how to change the optimizer’s behavior when needed to deliver faster execution times. You will gain the tools and skills needed to delight application users and to squeeze the most value from corporate computing resources. 




What You Will Learn
  • Monitor query performance to identify poor performers
  • Choose queries to optimize that will provide the greatest gain
  • Analyze queries using tools such as EXPLAIN ANALYZE and Visual Explain
  • Improve slow queries through a wide range of strategies
  • Properly deploy indexes and histograms to aid in creating fast execution plans
  • Understand and analyze locks to resolve contention and increase throughput



Who This Book Is For


Database administrators and SQL developers who are familiar with MySQL and need to participate in query tuning. While some experience with MySQL is required, no prior knowledge of query performance tuning is needed.




Authors and Affiliations

  • Hornsby, Australia

    Jesper Wisborg Krogh

About the author

Jesper Wisborg Krogh has worked with MySQL databases since 2006 both as an SQL developer, a database administrator, and for more than eight years as part of the Oracle MySQL Support team. He has spoken at MySQL Connect and Oracle OpenWorld on several occasions, and addition to his books, he regularly blogs on MySQL topics and has authored around 800 documents in the Oracle Knowledge Base. He has contributed to the sys schema and four Oracle Certified Professional (OCP) exams for MySQL 5.6 to 8.0.

He earned a PhD in computational chemistry before changing to work with MySQL and other software development in 2006. Jesper lives in Sydney, Australia, and enjoys spending time outdoors walking, traveling, and reading. His areas of expertise include MySQL Cluster, MySQL Enterprise Backup, performance tuning, and the Performance and sys schemas.

Bibliographic Information

  • Book Title: MySQL 8 Query Performance Tuning

  • Book Subtitle: A Systematic Method for Improving Execution Speeds

  • Authors: Jesper Wisborg Krogh

  • DOI: https://doi.org/10.1007/978-1-4842-5584-1

  • Publisher: Apress Berkeley, CA

  • eBook Packages: Professional and Applied Computing, Professional and Applied Computing (R0), Apress Access Books

  • Copyright Information: Jesper Wisborg Krogh 2020

  • Softcover ISBN: 978-1-4842-5583-4Published: 17 March 2020

  • eBook ISBN: 978-1-4842-5584-1Published: 16 March 2020

  • Edition Number: 1

  • Number of Pages: XXXVII, 965

  • Number of Illustrations: 135 b/w illustrations

  • Topics: Database Management, Open Source

Buy it now

Buying options

eBook USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access