Advertisement

Analyzing Queries

  • Jesper Wisborg Krogh
Chapter
  • 41 Downloads

Abstract

In the previous chapter, you learned how to find queries that are candidates for optimization. It is now time to take the next step – analyzing the queries to determine why they do not perform as expected. The main tool during the analysis is the EXPLAIN statement which shows the query plan the optimizer will use. Related are the optimizer traces that can be used to investigate why the optimizer ended up with the query plan. Another possibility is to use the statement and stage information in the Performance Schema to see where a stored procedure or a query spends the most time. These three topics will be discussed in this chapter.

Copyright information

© Jesper Wisborg Krogh 2020

Authors and Affiliations

  • Jesper Wisborg Krogh
    • 1
  1. 1.HornsbyAustralia

Personalised recommendations