SlideShare a Scribd company logo
1 of 16
Download to read offline
<Insert Picture Here>




Troubleshooting MySQL Performance: add-ons
Sveta Smirnova
Principal Technical MySQL Support Engineer
EXPLAIN



                                                                                               Which columns were compared with index
                  SELECT type              Possible keys           Length of the key                                                                                Additional information
                                                                                                                         Number of examined rows

    Number of SELECT      How data is accessed                 Key, which was actually used                                                           % of filtered rows
•   mysql> explain extended select * from t1 join t2;
                                                                                                  rows × filtered / 100 — number of rows, which will be joined with another table
•   +­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+

•   | id | select_type | table | type  | possible_keys | key         | key_len | ref  | rows | filtered | Extra                                              |

•   +­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+

•   |  1 | SIMPLE      | t1    | index | NULL          | col_int_key | 5       | NULL |    4 |   100.00 | Using index                                        |

•   |  1 | SIMPLE      | t2    | index | NULL          | col_int_key | 5       | NULL |    6 |   100.00 | Using index; Using join buffer (Block Nested Loop) |

•   +­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+

•   2 rows in set, 1 warning (0.00 sec)                                                Product of rows in this column: how many rows in all tables will be accessed

•           Table, for which information is printed
                                                                                                       For this example estimated value is 4*6 = 24
•   Note (Code 1003): /* select#1 */ select `test`.`t1`.`col_int_key` AS `col_int_key`,`test`.`t1`.`pk` AS `pk`,`test`.`t2`.`col_int_key` AS `col_int_key`,`test`.`t2`.`pk` 
    AS `pk` from `test`.`t1` join `test`.`t2`


            Actual (optimized) query as executed by MySQL Server
EXPLAIN: select_type
Name              Description
SIMPLE            Simple SELECT (not using UNION or subqueries)
PRIMARY           Outermost SELECT
UNION             Second or later SELECT statement in a UNION

DEPENDENT UNION   Second or later SELECT statement in a UNION, dependent on
                  outer query
UNION RESULT      Result of a UNION.
SUBQUERY          First SELECT in subquery
DEPENDENT         First SELECT in subquery, dependent on outer query
SUBQUERY
DERIVED           Derived table SELECT (subquery in FROM clause)
MATERIALIZED *    Materialized subquery
UNCACHEABLE       A subquery for which the result cannot be cached and must be
SUBQUERY          re-evaluated for each row of the outer query
UNCACHEABLE       The second or later select in a UNION that belongs to an
UNION             uncacheable subquery (see UNCACHEABLE SUBQUERY)
EXPLAIN: type
Name                    Description
system                  There is single row in the table
const                   There is single row in the table which corresponds WHERE clause and which can not be
                        retrieved using unique key: WHERE primary_key=CONST
eq_ref                  Single row will be read for each combination of rows from earlier accessed tables. Used in
                        JOIN-s by unique NOT NULL key if equal comparison (by = sign) happens
ref                     All rows, necessary for the JOIN can be read by non-unique key or few first signs if comparisons
                        = and <=> used
fulltext                Full text key will be used
ref_or_null             Same as ref, but with additional search by NULL:
                        WHERE key_column=expr OR key_column IS NULL
index_merge             Index Merge optimization used: search by several keys.
unique_subquery         IN subquery, which should find values by unique key, was converted to more effective function
                        of search by index
index_subquery          IN subquery, which should find values by non-unique key, was converted to more effective
                        function of search by index
range                   Only rows that are in a given range are retrieved, using an index to select the rows. Used for
                        operations: =, <>, >, >=, <, <=, IS NULL, <=>, BETWEEN, IN()
index                   Whole index will be read
ALL                     A full table scan is done for each combination of rows from the previous tables: each row from
                        the table will be read
EXPLAIN: Extra
Content                                               Description
const row not found                                   Empty table
Distinct                                              After first value found, search is stopped, because only distinct
                                                      values needed
Full scan on NULL key                                 Index can not be used to resolve this subquery
Impossible HAVING                                     The HAVING clause is always false and cannot select any rows.

Impossible WHERE                                      The WHERE clause is always false and cannot select any rows.
Impossible WHERE noticed after reading const tables   MySQL has read all const (and system) tables and notice that the
                                                      WHERE clause is always false.
No matching min/max row                               No row satisfies the condition for a query such as SELECT
                                                      MIN(...) FROM ... WHERE condition.
no matching row in const table                        For a query with a join, there was an empty table or a table with
                                                      no rows satisfying a unique index condition.
No tables used                                        The query has no FROM clause, or has a FROM DUAL clause.
Not exist                                             LEFT JOIN optimization: for every row from the left table only one
                                                      row from right one will be examined. This does not depend from
                                                      how many rows which satisfy the condition are in the right table.


Range checked for each record (index map: N)          MySQL found no good index to use, but found that the index can
                                                      be used after retrieving rows from preceding tables.
EXPLAIN: Extra
Content                                                         Description
Scanned N databases                                             INFORMATION_SCHEMA optimization: how many database
                                                                directories were examined during the query
Select tables optimized away                                    The query contained only aggregate functions (MIN(), MAX()) that
                                                                were all resolved using an index and no GROUP BY clause. The
                                                                optimizer determined that only one row should be returned.
Skip_open_table, Open_frm_only, Open_trigger_only,              INFORMATION_SCHEMA optimization
Open_full_table
unique row not found                                            For a query such as SELECT ... FROM tbl_name, no rows satisfy
                                                                the condition for a UNIQUE index or PRIMARY KEY on the table.
Using filesort                                                  MySQL must do an extra pass to find out how to retrieve the rows
                                                                in sorted order.. Filesort does not always mean physical file will be
                                                                created on a disk: sorting in RAM only can be used.
Using index                                                     Query result can be retrieved without accessing the data, only
                                                                from index(SELECT ind_col ... WHERE ind_cond)
Using index for group-by                                        Only index used to retrieve results for GROUP BY or DISTINCT
                                                                queries
Using join buffer                                               Tables from earlier joins are read in portions into the join buffer,
                                                                and then their rows are used from the buffer to perform the join
                                                                with the current table.
Using sort_union(...), Using union(...), Using intersect(...)   These indicate how index scans are merged for the index_merge
                                                                join type.
Using temporary                                                 To resolve the query, MySQL needs to create a temporary table to
                                                                hold the result.
Using where                                                     A WHERE clause is used to restrict which rows to match against
                                                                the next table or send to the client.
Handler_% status variables
Name                         Description
Handler_commit               Number of COMMIT queries
Handler_delete               How many times rows from the table were deleted. Useful when you watch DELETE from huge table

Handler_prepare              PREPARE counter for two-phase COMMIT operations
Handler_read_first           How many times first row from the index was read. Can indicate full index scan
Handler_read_key             How many times row was read using index. Increases when indexes are used properly.

Handler_read_last            How many times last row from the index thewas read.
Handler_read_next            Number of reads of next row in the index
Handler_read_prev            Number of reads of previous row in the index
Handler_read_rnd             Number of read requests based on fixed position. Indicates queries which require sorting or JOINs
                             which don't use indexes.
Handler_read_rnd_next        Number of requests to read next row from the table. Indicates full table scan and wrong index usage


Handler_rollback             Number of ROLLBACK queries
Handler_savepoint            Number of SAVEPOINT queries
Handler_savepoint_rollback   Number of ROLLBACK to SAVEPOINT queries


Handler_update               Number of update queries.
Handler_write                Number of requests to write a row into table. Useful when watch huge load: INSERT or UPDATE
                             which affects many rows.
SHOW [FULL] PROCESSLIST

      MySQL thread ID (connection id)


                    Full — show full query                            What happens. For example, executed query


                                                                 State
•   mysql> show full processlist;
•   +­­­­+­­­­­­+­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
•   | Id | User | Host            | db   | Command | Time | State      | Info                               |
•   +­­­­+­­­­­­+­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
•   |  3 | root | localhost       | test | Query   |    0 | init       | show full processlist              |
•   |  1 | root | localhost:51051 | test | Query   |    5 | User sleep | select * from t2 where sleep(10)=0 |
•   +­­­­+­­­­­­+­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+
•   2 rows in set (0.00 sec)
                               Default database      Execution time
          User



                   Host             Operation type
SHOW INDEX
                                                                                                                                       User comment

                                                                                                                                 (at index creation time)
                                                                                                      How the key packed

                                                                                                                     Is NULL allowed?
          Table name                           Column name
                         Index name
•   mysql> show index from tind;
                                                                 Number of unique values                                Type of the index
•   +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­+

•   | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |

•   +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­+

•   | tind  |          0 | PRIMARY  |            1 | id          | A         |           6 |     NULL | NULL   |      | BTREE      |         |               |

•   | tind  |          1 | f1       |            1 | f1          | A         |           6 |     NULL | NULL   | YES  | BTREE      |         | someone       |

•   | tind  |          1 | f2       |            1 | f2          | NULL      |           6 |     NULL | NULL   | YES  | FULLTEXT   |         |               |

•   +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­+

•   3 rows in set (0.01 sec)


                                                  How values are sorted
                                                                                                                       Additional information
                                                       А — ascending
                                                                                                                       (for example, disabled)
                                                    NULL — not sorted

    If the index unique. 0 means unique                                               How many values are partially indexed


                                   Serial number. Makes sense for multiple-column indexes.
Optimizer switches

Name                     Description




index_merge              If optimization for multiple index searches is turn on or off


index_merge_intersection Intersections optimization: AND clause
                         Example: key_col1 < 10 AND key_col2 = 'foo'

index_merge_union        Union optimization: OR clause
                         Example: key_col1 = 'foo' OR (key_col2 = 
                         'bar' AND key_col3 = 'baz')
index_merge_sort_union   Union optimization if index_merge_union can not be used
                         Example: (key_col1 > 10 OR key_col2 = 'bar') 
                         AND key_col3 = 'baz'
INFORMATION_SCHEMA.INNODB_% table
Name                  Description

INNODB_TRX            Currently running transactions

INNODB_LOCKS          Locks, which are currently hold

INNODB_LOCK_WAITS     Transactions which wait locks

INNODB_CMP            Information about compressed tables

INNODB_CMP_RESET      Information about compressed tables. Data in this table
                      get removed after the query. Useful to watch changes.

INNODB_CMPMEM         Information about compressed pages

INNODB_CMPMEM_RESET   Information about compressed pages. Data in this
                      table get removed after the query. Useful to watch
                      changes.
ENGINE INNODB STATUS

Name                              Description

BACKGROUND THREAD                 Background thread activity

SEMAPHORES                        Internal semaphores. For example, when
                                  CHECK TABLE is running
TRANSACTIONS                      Current transactions

FILE I/O                          IO operations, all internal threads

INSERT BUFFER AND ADAPTIVE HASH   Insert buffer and adaptive hash index
INDEX                             usage
LOG                               Operations with InnoDB log files

BUFFER POOL AND MEMORY            InnoDB buffer pool and memory usage

ROW OPERATIONS                    Row operations and statistics
Buffers, which affect performance
Name                     Description
join_buffer_size         JOINs and table scans. Allocates for each pair of tables in JOIN

net_buffer_length        Buffer for every connection, contains queries and their results.

query_prealloc_size      To handle (parse) query. Longer the query, bigger the buffer.

read_buffer_size         For every sequential table scan

read_rnd_buffer_size     For sorting results. Affects speed of ORDER BY

sort_buffer_size         Allocated for every sort operation

sql_buffer_result        If set, server saves result of every query in the temporary table which allows to free locks more
                         quickly.
thread_cache_size        Number of threads, allocated when connection was made which can be used second time.

thread_stack             Size of stack for every connection thread. If too small, complicated queries and recursive
                         routines could be rejected
tmp_table_size           Maximum size for internal memory tables in memory: after this size is reached, these tables get
                         converted to temporary tables on disk.
query_cache_size         Size of query cache. Not recommended to set this option larger than 100 MB

table_definition_cache   How many table definition to store in cache

table_open_cache         How many table descriptors to store in cache.
SHOW GLOBAL STATUS: performance
Name                                                   Description
Aborted_clients, Aborted_connects                      Aborted clients and connections

Binlog_[stmt_]cache_use, Binlog_[stmt_]cache_disk_use Binlog cache usage activity

Bytes_received, Bytes_sent                             Data traffic

Com_*                                                  Statistics of queries and command (INIT DB when open connection, etc.)
                                                       usage
Created_tmp_[disk_]tables, Created_tmp_files           Temporary tables and files usage

Handler_*                                              See above

Innodb_*                                               InnoDB statistics: buffer pool, lor, i/o operations, other

Key_blocks_*                                           Key usage statistics

Open_*, Opened_*                                       Open files, tables, etc. Opened — since server started. If Open is equal to
                                                       corresponding buffer size and Opened high, consider to increase the
                                                       buffer
Qcache_*                                               Query cache usage statistics

Connections, Queries, Questions                        Number of connections and queries, Queries contain calls from stored
                                                       routines while Questions do not
Select_*, Sort_*                                       SELECT queries and sort statistics

Table_locks_*                                          Table lock statistics

Threads_*                                               Connection statistics
Performance Schema tables
Name                                           Description
cond_instances                                 State after server start (i.e., wait/synch/cond/sql/DEBUG_SYNC::cond)

events_waits_current                           Threads waiting locks

events_waits_history                           Last performance_schema_events_waits_history_size waits

events_waits_history_long                      Last performance_schema_events_waits_history_long_size waits

events_waits_summary_by_instance               Summary of waits by instance (i.e.,
                                               wait/synch/mutex/sql/LOCK_uuid_generator)
events_waits_summary_by_thread_by_event_name   Summary of waits by thereads and event names (i.e.,
                                               wait/synch/mutex/sql/PAGE::lock)
events_waits_summary_global_by_event_name      Global summary by events, not linked to threads.

file_instances                                 All files, which were opened since server startup

file_summary_by_event_name                     Summary of file operations by events ( wait/io/file/sql/map)

file_summary_by_instance                       Summary of file operations by file name

mutex_instances                                Mutex list. If LOCKED_BY_THREAD_IDis not NULL: current.

performance_timers                             Timer types.

rwlock_instances                               IO locks.

setup_consumers                                Settings: if output into corresponding table is ON or OFF.

setup_instruments                              Settings: which events to watch.

setup_timers                                   Settings:which timer to use.

threads                                        All server internal threads (don't mix with connections).
The preceding is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.

More Related Content

What's hot

Introduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sIntroduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sSveta Smirnova
 
Billion Goods in Few Categories: how Histograms Save a Life?
Billion Goods in Few Categories: how Histograms Save a Life?Billion Goods in Few Categories: how Histograms Save a Life?
Billion Goods in Few Categories: how Histograms Save a Life?Sveta Smirnova
 
Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?Sveta Smirnova
 
Optimizing queries MySQL
Optimizing queries MySQLOptimizing queries MySQL
Optimizing queries MySQLGeorgi Sotirov
 
0888 learning-mysql
0888 learning-mysql0888 learning-mysql
0888 learning-mysqlsabir18
 
Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sSveta Smirnova
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query TuningAlexander Rubin
 
Powerful Explain in MySQL 5.6
Powerful Explain in MySQL 5.6Powerful Explain in MySQL 5.6
Powerful Explain in MySQL 5.6MYXPLAIN
 
Advanced MySQL Query and Schema Tuning
Advanced MySQL Query and Schema TuningAdvanced MySQL Query and Schema Tuning
Advanced MySQL Query and Schema TuningMYXPLAIN
 
Efficient Pagination Using MySQL
Efficient Pagination Using MySQLEfficient Pagination Using MySQL
Efficient Pagination Using MySQLEvan Weaver
 
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...Sveta Smirnova
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index TuningManikanda kumar
 
MySQL partitions tutorial
MySQL partitions tutorialMySQL partitions tutorial
MySQL partitions tutorialGiuseppe Maxia
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersJonathan Levin
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZENorvald Ryeng
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Sveta Smirnova
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialSveta Smirnova
 
PyCon 2010 SQLAlchemy tutorial
PyCon 2010 SQLAlchemy tutorialPyCon 2010 SQLAlchemy tutorial
PyCon 2010 SQLAlchemy tutorialjbellis
 

What's hot (20)

Introduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sIntroduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]s
 
Billion Goods in Few Categories: how Histograms Save a Life?
Billion Goods in Few Categories: how Histograms Save a Life?Billion Goods in Few Categories: how Histograms Save a Life?
Billion Goods in Few Categories: how Histograms Save a Life?
 
Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?Optimizer Histograms: When they Help and When Do Not?
Optimizer Histograms: When they Help and When Do Not?
 
Optimizing queries MySQL
Optimizing queries MySQLOptimizing queries MySQL
Optimizing queries MySQL
 
0888 learning-mysql
0888 learning-mysql0888 learning-mysql
0888 learning-mysql
 
Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]s
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query Tuning
 
Powerful Explain in MySQL 5.6
Powerful Explain in MySQL 5.6Powerful Explain in MySQL 5.6
Powerful Explain in MySQL 5.6
 
Advanced MySQL Query and Schema Tuning
Advanced MySQL Query and Schema TuningAdvanced MySQL Query and Schema Tuning
Advanced MySQL Query and Schema Tuning
 
Efficient Pagination Using MySQL
Efficient Pagination Using MySQLEfficient Pagination Using MySQL
Efficient Pagination Using MySQL
 
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 
MySQL partitions tutorial
MySQL partitions tutorialMySQL partitions tutorial
MySQL partitions tutorial
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for Developers
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?
 
Oracle Sql & PLSQL Complete guide
Oracle Sql & PLSQL Complete guideOracle Sql & PLSQL Complete guide
Oracle Sql & PLSQL Complete guide
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete Tutorial
 
PyCon 2010 SQLAlchemy tutorial
PyCon 2010 SQLAlchemy tutorialPyCon 2010 SQLAlchemy tutorial
PyCon 2010 SQLAlchemy tutorial
 

Similar to Troubleshooting MySQL Performance add-ons

My sql explain cheat sheet
My sql explain cheat sheetMy sql explain cheat sheet
My sql explain cheat sheetAchievers Tech
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Trainingbixxman
 
Its about a sql topic for basic structured query language
Its about a sql topic for basic structured query languageIts about a sql topic for basic structured query language
Its about a sql topic for basic structured query languageIMsKanchanaI
 
Introduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).pptIntroduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).pptAshwini Rao
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxjainendraKUMAR55
 
Java class 8
Java class 8Java class 8
Java class 8Edureka!
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive dataAmrit Kaur
 
Joins & constraints
Joins & constraintsJoins & constraints
Joins & constraintsVENNILAV6
 
6.3 my sql queryoptimization_part2
6.3 my sql queryoptimization_part26.3 my sql queryoptimization_part2
6.3 my sql queryoptimization_part2Trần Thanh
 

Similar to Troubleshooting MySQL Performance add-ons (20)

My sql explain cheat sheet
My sql explain cheat sheetMy sql explain cheat sheet
My sql explain cheat sheet
 
MULTIPLE TABLES
MULTIPLE TABLES MULTIPLE TABLES
MULTIPLE TABLES
 
Ora faq
Ora faqOra faq
Ora faq
 
Ora faq
Ora faqOra faq
Ora faq
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
Database Overview
Database OverviewDatabase Overview
Database Overview
 
Optimizing MySQL queries
Optimizing MySQL queriesOptimizing MySQL queries
Optimizing MySQL queries
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Training
 
Interview Questions.pdf
Interview Questions.pdfInterview Questions.pdf
Interview Questions.pdf
 
MySQL JOIN & UNION
MySQL JOIN & UNIONMySQL JOIN & UNION
MySQL JOIN & UNION
 
Its about a sql topic for basic structured query language
Its about a sql topic for basic structured query languageIts about a sql topic for basic structured query language
Its about a sql topic for basic structured query language
 
Introduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).pptIntroduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).ppt
 
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
Views, Triggers, Functions, Stored Procedures,  Indexing and JoinsViews, Triggers, Functions, Stored Procedures,  Indexing and Joins
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
 
MSSQL_Book.pdf
MSSQL_Book.pdfMSSQL_Book.pdf
MSSQL_Book.pdf
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptx
 
Sql wksht-7
Sql wksht-7Sql wksht-7
Sql wksht-7
 
Java class 8
Java class 8Java class 8
Java class 8
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive data
 
Joins & constraints
Joins & constraintsJoins & constraints
Joins & constraints
 
6.3 my sql queryoptimization_part2
6.3 my sql queryoptimization_part26.3 my sql queryoptimization_part2
6.3 my sql queryoptimization_part2
 

More from Sveta Smirnova

MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?Sveta Smirnova
 
Database in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and MonitoringDatabase in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and MonitoringSveta Smirnova
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveSveta Smirnova
 
MySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersMySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersSveta Smirnova
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
MySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации баговMySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации баговSveta Smirnova
 
MySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessMySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessSveta Smirnova
 
Производительность MySQL для DevOps
 Производительность MySQL для DevOps Производительность MySQL для DevOps
Производительность MySQL для DevOpsSveta Smirnova
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB ClusterHow to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB ClusterSveta Smirnova
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsSveta Smirnova
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Sveta Smirnova
 
How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
 
Современному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaСовременному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaSveta Smirnova
 
How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
 
How Safe is Asynchronous Master-Master Setup?
 How Safe is Asynchronous Master-Master Setup? How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
 
Что нужно знать о трёх топовых фичах MySQL
Что нужно знать  о трёх топовых фичах  MySQLЧто нужно знать  о трёх топовых фичах  MySQL
Что нужно знать о трёх топовых фичах MySQLSveta Smirnova
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Sveta Smirnova
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 MinutesSveta Smirnova
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demoSveta Smirnova
 

More from Sveta Smirnova (20)

MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?
 
Database in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and MonitoringDatabase in Kubernetes: Diagnostics and Monitoring
Database in Kubernetes: Diagnostics and Monitoring
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to Have
 
MySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersMySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for Developers
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
MySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации баговMySQL Test Framework для поддержки клиентов и верификации багов
MySQL Test Framework для поддержки клиентов и верификации багов
 
MySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessMySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your Business
 
Производительность MySQL для DevOps
 Производительность MySQL для DevOps Производительность MySQL для DevOps
Производительность MySQL для DevOps
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB ClusterHow to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB Cluster
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tears
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...
 
How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?
 
Современному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaСовременному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
Современному хайлоду - современные решения: MySQL 8.0 и улучшения Percona
 
How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with Galera
 
How Safe is Asynchronous Master-Master Setup?
 How Safe is Asynchronous Master-Master Setup? How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?
 
Что нужно знать о трёх топовых фичах MySQL
Что нужно знать  о трёх топовых фичах  MySQLЧто нужно знать  о трёх топовых фичах  MySQL
Что нужно знать о трёх топовых фичах MySQL
 
Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?Billion Goods in Few Categories: How Histograms Save a Life?
Billion Goods in Few Categories: How Histograms Save a Life?
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demo
 

Recently uploaded

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Troubleshooting MySQL Performance add-ons

  • 1. <Insert Picture Here> Troubleshooting MySQL Performance: add-ons Sveta Smirnova Principal Technical MySQL Support Engineer
  • 2. EXPLAIN Which columns were compared with index SELECT type Possible keys Length of the key Additional information Number of examined rows Number of SELECT How data is accessed Key, which was actually used % of filtered rows • mysql> explain extended select * from t1 join t2; rows × filtered / 100 — number of rows, which will be joined with another table • +­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ • | id | select_type | table | type  | possible_keys | key         | key_len | ref  | rows | filtered | Extra                                              | • +­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ • |  1 | SIMPLE      | t1    | index | NULL          | col_int_key | 5       | NULL |    4 |   100.00 | Using index                                        | • |  1 | SIMPLE      | t2    | index | NULL          | col_int_key | 5       | NULL |    6 |   100.00 | Using index; Using join buffer (Block Nested Loop) | • +­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ • 2 rows in set, 1 warning (0.00 sec) Product of rows in this column: how many rows in all tables will be accessed • Table, for which information is printed For this example estimated value is 4*6 = 24 • Note (Code 1003): /* select#1 */ select `test`.`t1`.`col_int_key` AS `col_int_key`,`test`.`t1`.`pk` AS `pk`,`test`.`t2`.`col_int_key` AS `col_int_key`,`test`.`t2`.`pk`  AS `pk` from `test`.`t1` join `test`.`t2` Actual (optimized) query as executed by MySQL Server
  • 3. EXPLAIN: select_type Name Description SIMPLE Simple SELECT (not using UNION or subqueries) PRIMARY Outermost SELECT UNION Second or later SELECT statement in a UNION DEPENDENT UNION Second or later SELECT statement in a UNION, dependent on outer query UNION RESULT Result of a UNION. SUBQUERY First SELECT in subquery DEPENDENT First SELECT in subquery, dependent on outer query SUBQUERY DERIVED Derived table SELECT (subquery in FROM clause) MATERIALIZED * Materialized subquery UNCACHEABLE A subquery for which the result cannot be cached and must be SUBQUERY re-evaluated for each row of the outer query UNCACHEABLE The second or later select in a UNION that belongs to an UNION uncacheable subquery (see UNCACHEABLE SUBQUERY)
  • 4. EXPLAIN: type Name Description system There is single row in the table const There is single row in the table which corresponds WHERE clause and which can not be retrieved using unique key: WHERE primary_key=CONST eq_ref Single row will be read for each combination of rows from earlier accessed tables. Used in JOIN-s by unique NOT NULL key if equal comparison (by = sign) happens ref All rows, necessary for the JOIN can be read by non-unique key or few first signs if comparisons = and <=> used fulltext Full text key will be used ref_or_null Same as ref, but with additional search by NULL: WHERE key_column=expr OR key_column IS NULL index_merge Index Merge optimization used: search by several keys. unique_subquery IN subquery, which should find values by unique key, was converted to more effective function of search by index index_subquery IN subquery, which should find values by non-unique key, was converted to more effective function of search by index range Only rows that are in a given range are retrieved, using an index to select the rows. Used for operations: =, <>, >, >=, <, <=, IS NULL, <=>, BETWEEN, IN() index Whole index will be read ALL A full table scan is done for each combination of rows from the previous tables: each row from the table will be read
  • 5. EXPLAIN: Extra Content Description const row not found Empty table Distinct After first value found, search is stopped, because only distinct values needed Full scan on NULL key Index can not be used to resolve this subquery Impossible HAVING The HAVING clause is always false and cannot select any rows. Impossible WHERE The WHERE clause is always false and cannot select any rows. Impossible WHERE noticed after reading const tables MySQL has read all const (and system) tables and notice that the WHERE clause is always false. No matching min/max row No row satisfies the condition for a query such as SELECT MIN(...) FROM ... WHERE condition. no matching row in const table For a query with a join, there was an empty table or a table with no rows satisfying a unique index condition. No tables used The query has no FROM clause, or has a FROM DUAL clause. Not exist LEFT JOIN optimization: for every row from the left table only one row from right one will be examined. This does not depend from how many rows which satisfy the condition are in the right table. Range checked for each record (index map: N) MySQL found no good index to use, but found that the index can be used after retrieving rows from preceding tables.
  • 6. EXPLAIN: Extra Content Description Scanned N databases INFORMATION_SCHEMA optimization: how many database directories were examined during the query Select tables optimized away The query contained only aggregate functions (MIN(), MAX()) that were all resolved using an index and no GROUP BY clause. The optimizer determined that only one row should be returned. Skip_open_table, Open_frm_only, Open_trigger_only, INFORMATION_SCHEMA optimization Open_full_table unique row not found For a query such as SELECT ... FROM tbl_name, no rows satisfy the condition for a UNIQUE index or PRIMARY KEY on the table. Using filesort MySQL must do an extra pass to find out how to retrieve the rows in sorted order.. Filesort does not always mean physical file will be created on a disk: sorting in RAM only can be used. Using index Query result can be retrieved without accessing the data, only from index(SELECT ind_col ... WHERE ind_cond) Using index for group-by Only index used to retrieve results for GROUP BY or DISTINCT queries Using join buffer Tables from earlier joins are read in portions into the join buffer, and then their rows are used from the buffer to perform the join with the current table. Using sort_union(...), Using union(...), Using intersect(...) These indicate how index scans are merged for the index_merge join type. Using temporary To resolve the query, MySQL needs to create a temporary table to hold the result. Using where A WHERE clause is used to restrict which rows to match against the next table or send to the client.
  • 7. Handler_% status variables Name Description Handler_commit Number of COMMIT queries Handler_delete How many times rows from the table were deleted. Useful when you watch DELETE from huge table Handler_prepare PREPARE counter for two-phase COMMIT operations Handler_read_first How many times first row from the index was read. Can indicate full index scan Handler_read_key How many times row was read using index. Increases when indexes are used properly. Handler_read_last How many times last row from the index thewas read. Handler_read_next Number of reads of next row in the index Handler_read_prev Number of reads of previous row in the index Handler_read_rnd Number of read requests based on fixed position. Indicates queries which require sorting or JOINs which don't use indexes. Handler_read_rnd_next Number of requests to read next row from the table. Indicates full table scan and wrong index usage Handler_rollback Number of ROLLBACK queries Handler_savepoint Number of SAVEPOINT queries Handler_savepoint_rollback Number of ROLLBACK to SAVEPOINT queries Handler_update Number of update queries. Handler_write Number of requests to write a row into table. Useful when watch huge load: INSERT or UPDATE which affects many rows.
  • 8. SHOW [FULL] PROCESSLIST MySQL thread ID (connection id) Full — show full query What happens. For example, executed query State • mysql> show full processlist; • +­­­­+­­­­­­+­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ • | Id | User | Host            | db   | Command | Time | State      | Info                               | • +­­­­+­­­­­­+­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ • |  3 | root | localhost       | test | Query   |    0 | init       | show full processlist              | • |  1 | root | localhost:51051 | test | Query   |    5 | User sleep | select * from t2 where sleep(10)=0 | • +­­­­+­­­­­­+­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ • 2 rows in set (0.00 sec) Default database Execution time User Host Operation type
  • 9. SHOW INDEX User comment (at index creation time) How the key packed Is NULL allowed? Table name Column name Index name • mysql> show index from tind; Number of unique values Type of the index • +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­+ • | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | • +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­+ • | tind  |          0 | PRIMARY  |            1 | id          | A         |           6 |     NULL | NULL   |      | BTREE      |         |               | • | tind  |          1 | f1       |            1 | f1          | A         |           6 |     NULL | NULL   | YES  | BTREE      |         | someone       | • | tind  |          1 | f2       |            1 | f2          | NULL      |           6 |     NULL | NULL   | YES  | FULLTEXT   |         |               | • +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­+­­­­­­+­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­+ • 3 rows in set (0.01 sec) How values are sorted Additional information А — ascending (for example, disabled) NULL — not sorted If the index unique. 0 means unique How many values are partially indexed Serial number. Makes sense for multiple-column indexes.
  • 10. Optimizer switches Name Description index_merge If optimization for multiple index searches is turn on or off index_merge_intersection Intersections optimization: AND clause Example: key_col1 < 10 AND key_col2 = 'foo' index_merge_union Union optimization: OR clause Example: key_col1 = 'foo' OR (key_col2 =  'bar' AND key_col3 = 'baz') index_merge_sort_union Union optimization if index_merge_union can not be used Example: (key_col1 > 10 OR key_col2 = 'bar')  AND key_col3 = 'baz'
  • 11. INFORMATION_SCHEMA.INNODB_% table Name Description INNODB_TRX Currently running transactions INNODB_LOCKS Locks, which are currently hold INNODB_LOCK_WAITS Transactions which wait locks INNODB_CMP Information about compressed tables INNODB_CMP_RESET Information about compressed tables. Data in this table get removed after the query. Useful to watch changes. INNODB_CMPMEM Information about compressed pages INNODB_CMPMEM_RESET Information about compressed pages. Data in this table get removed after the query. Useful to watch changes.
  • 12. ENGINE INNODB STATUS Name Description BACKGROUND THREAD Background thread activity SEMAPHORES Internal semaphores. For example, when CHECK TABLE is running TRANSACTIONS Current transactions FILE I/O IO operations, all internal threads INSERT BUFFER AND ADAPTIVE HASH Insert buffer and adaptive hash index INDEX usage LOG Operations with InnoDB log files BUFFER POOL AND MEMORY InnoDB buffer pool and memory usage ROW OPERATIONS Row operations and statistics
  • 13. Buffers, which affect performance Name Description join_buffer_size JOINs and table scans. Allocates for each pair of tables in JOIN net_buffer_length Buffer for every connection, contains queries and their results. query_prealloc_size To handle (parse) query. Longer the query, bigger the buffer. read_buffer_size For every sequential table scan read_rnd_buffer_size For sorting results. Affects speed of ORDER BY sort_buffer_size Allocated for every sort operation sql_buffer_result If set, server saves result of every query in the temporary table which allows to free locks more quickly. thread_cache_size Number of threads, allocated when connection was made which can be used second time. thread_stack Size of stack for every connection thread. If too small, complicated queries and recursive routines could be rejected tmp_table_size Maximum size for internal memory tables in memory: after this size is reached, these tables get converted to temporary tables on disk. query_cache_size Size of query cache. Not recommended to set this option larger than 100 MB table_definition_cache How many table definition to store in cache table_open_cache How many table descriptors to store in cache.
  • 14. SHOW GLOBAL STATUS: performance Name Description Aborted_clients, Aborted_connects Aborted clients and connections Binlog_[stmt_]cache_use, Binlog_[stmt_]cache_disk_use Binlog cache usage activity Bytes_received, Bytes_sent Data traffic Com_* Statistics of queries and command (INIT DB when open connection, etc.) usage Created_tmp_[disk_]tables, Created_tmp_files Temporary tables and files usage Handler_* See above Innodb_* InnoDB statistics: buffer pool, lor, i/o operations, other Key_blocks_* Key usage statistics Open_*, Opened_* Open files, tables, etc. Opened — since server started. If Open is equal to corresponding buffer size and Opened high, consider to increase the buffer Qcache_* Query cache usage statistics Connections, Queries, Questions Number of connections and queries, Queries contain calls from stored routines while Questions do not Select_*, Sort_* SELECT queries and sort statistics Table_locks_* Table lock statistics Threads_* Connection statistics
  • 15. Performance Schema tables Name Description cond_instances State after server start (i.e., wait/synch/cond/sql/DEBUG_SYNC::cond) events_waits_current Threads waiting locks events_waits_history Last performance_schema_events_waits_history_size waits events_waits_history_long Last performance_schema_events_waits_history_long_size waits events_waits_summary_by_instance Summary of waits by instance (i.e., wait/synch/mutex/sql/LOCK_uuid_generator) events_waits_summary_by_thread_by_event_name Summary of waits by thereads and event names (i.e., wait/synch/mutex/sql/PAGE::lock) events_waits_summary_global_by_event_name Global summary by events, not linked to threads. file_instances All files, which were opened since server startup file_summary_by_event_name Summary of file operations by events ( wait/io/file/sql/map) file_summary_by_instance Summary of file operations by file name mutex_instances Mutex list. If LOCKED_BY_THREAD_IDis not NULL: current. performance_timers Timer types. rwlock_instances IO locks. setup_consumers Settings: if output into corresponding table is ON or OFF. setup_instruments Settings: which events to watch. setup_timers Settings:which timer to use. threads All server internal threads (don't mix with connections).
  • 16. The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.