SlideShare a Scribd company logo
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Performance Schema
Out of the Box in MySQL 5.7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Mayank Prasad
Principal Member Technical Staff
Oracle, MySQL
November 20, 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following 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.
2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Need and Design
Instruments and instrumentation
Statistics tables
Use cases
What’s new in MySQL 5.7
1
2
3
4
5
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Need and Design
Instruments and instrumentation
Statistics tables
Use cases
What’s new in MySQL 5.7
1
2
3
4
5
4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Why Performance Schema?
System
Low throughput?
?
5
DBA
Hot table?
Network
High traffic on link?
Storage
Too much Disk spin?App Developer
Slow application?
MySQL Developer
Code contention?
End User
stuck session?
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 Performance Schema : Design
Block Diagram
MySQL
Server
Instrumentation points
(P_S hooks)
P_S Internal Buffers
P_S
Storage
Engine
Storage
Engine
Interface
Statistics
Report
Fetch
Data
SQL Query
Collect Data
Store
Data
P_S
Tables
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Need and Design
Instruments and instrumentation
Statistics tables
Use cases
What’s new in MySQL 5.7
1
2
3
4
5
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Instruments
8
• Name of monitored activity.
• Tree like structure. Separated by ‘/’.
• Left to right : More generic to more specific.
• 1000+ instruments in MySQL 5.7.
• Stored in setup_instruments table.
wait/io/file/myisam/log
statement/sql/select
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Need and Design
Instruments and instrumentation
Statistics tables
Use cases
What’s new in MySQL 5.7
1
2
3
4
5
9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Statistics Tables in Performance Schema
10
SETUP
TABLES
Instruments
Actors
Objects
Consumers
TIMERS
EVENTS
TABLES
Transactions
Statements
Stages
Waits
Idle
REPLICATION
SUMMARY
SYSTEM
VARIABLES
STATUS
VARIABLES
LOCK TABLES
Metadata
locks
Table Handles
SUMMARY
TABLES
Events
Memory
File I/O,
Table I/O,
Table locks
Socket
Connection
…
CONNECTION
Attribute
Type
INSTANCE
TABLES
Mutex
RW_locks
File
Sockets
Cond MISC
By_global By_thread By_user/host By_account By_digest
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Need and Design
Instruments and instrumentation
Statistics tables
Use cases
What’s new in MySQL 5.7
1
2
3
4
5
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What does Performance Schema provide …
update setup_instruments set ENABLED='YES', TIMED='YES';
12
Connection 1 (Thread 24)
start transaction;
insert into test.t1 values('11');
commit;
start transaction;
insert into test.t1 values('12');
commit;
start transaction;
insert into test.t1 values('13');
commit;
select * from test.t1;
Connection 2 (Thread 25)
start transaction;
insert into test.t2 values('21');
commit;
start transaction;
insert into test.t2 values('22');
commit;
Three
inserts
Two
inserts
Latest
Statement
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What does Performance Schema provide … (cont.)
Statements Statistics
* Timer unit is PICOSECOND.
EVENTS_STATEMENTS_CURRENT
THREAD_ID 24 25
EVENT_NAME
statement/sql
/select
statement/sql/
commit
TIMER_WAIT 876585000 15998287000
SQL_TEXT
select * from
test.t1
commit
ROWS_SENT 3 0
NO_INDEX_USED 0 0
SELECT_SCAN 1 0
13
EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT
_NAME
THREAD_ID 24 25
EVENT_NAME
statement/sql
/insert
statement/sql
/insert
COUNT_STAR 3 2
SUM_TIMER_WAIT 35181659000 3477432000
SUM_ROWS_AFFECTED 3 2
SUM_SELECT_SCAN 0 0
SUM_NO_INDEX_USED 0 0
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What does Performance Schema provide … (cont.)
Statements Statistics (cont.)
* Timer unit is PICOSECOND.
14
EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME
EVENT_NAME statement/sql/insert statement/sql/commit
COUNT_STAR 5 5
SUM_TIMER_WAIT 38659091000 65812216000
… …
SUM_ROWS_AFFECTED 5 0
… … …
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use case 1
Description
15
• Multiple queries running for long on MySQL Server
• Few long running query (taking lots of time)
• No idea which one
• No idea why
• What to do ? …
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use case 1
Diagnosis
16
– THREAD_ID: 25
– EVENT_ID: 89
– EVENT_NAME: statement/sql/select
– SQL_TEXT : select bla bla bla…;
• Wait ! There’s more!
– SELECT_SCAN : 1
– NO_INDEX_USED: 1
• Aha !!
SELECT * FROM events_statements_history WHERE TIMER_WAIT > ‘X’;
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use case 2
Statements giving errors ( or warnings)
17
SELECT DIGEST_TEXT, SCHEMA_NAME, COUNT_STAR, SUM_ERRORS, SUM_WARNINGS
FROM events_statements_summary_by_digest WHERE SUM_ERRORS > 0
ORDER BY SUM_ERRORS DESC limit 1G;
EVENTS_STATEMENTS_SUMMARY_BY_DIGEST
DIGEST_TEXT CREATE TEMPORARY TABLE IF NOT ... _logs` ( `id` INT8 NOT NULL )!
SCHEMA_NAME mem
COUNT_STAR 1725
SUM_ERRORS 1725
SUM_WARNINGS 0
FIRST_SEEN 2014-05-20 10:42:32
LAST_SEEN 2014-05-21 18:39:22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use case 3
Description
18
• Multithreaded environment
• My session is stuck
• No idea why
• What to do ? …
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use case 3
• What T1 is waiting for
– Say T1 is waiting for mutex_A (column OBJECT_INSTANCE_BEGIN)
• Lets see who has taken this mutex_A
– Ok, so thread T2 is holding mutex_A (column LOCKED_BY_THREAD_ID)
• Find out what thread t2 is waiting for
• And so on…
SELECT * FROM mutex_instances WHERE OBJECT_INSTANCE_BEGIN = mutex_A;
SELECT * FROM events_waits_current WHERE THREAD_ID = T2;
Diagnosis
19
SELECT * FROM events_waits_current WHERE THREAD_ID = T1;
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Replication Summary Tables
Tables for replication statistics
20
Replication status
Connection Information Execute Information
Connection Configuration Connection Status
Execute Configuration Execute Status
Coordinator/SQL
Thread
Worker Thread
replication_connection
_configuration
replication_connection
_status
replication_execute_status
_by_coordinator
replication_execute_status
_by_worker
replication_execute
_status
replication_execute
_configuration
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Replication Summary Tables
Tables for replication statistics
Table Information
replication_connection_configuration (Host, Port, User etc.)
replication_connection_status
(Server UUID, Receiver thread ID, Service
State etc.)
replication_execute_configuration (Desired Delay)
replication_execute_status (Remaining Delay)
replication_execute_status_by_coordinator (Thread Id, Service State, Last Error info.)
replication_execute_status_by_worker (WID, WTID, Service State, Last error Info.)
21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Replication Summary Tables
Tables for replication statistics
22
SHOW SLAVE STATUS (Limitations)
– No logical division of information.
– Lots of information packed together.
– No cherry picking (difficult for automation).
– Difficult to scale (more new fields).
Why Performance Schema Tables?
– Split logically into different tables.
– SQL Interface. Fetch what is required.
– Easier to extend.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Event Hierarchy
23
event_id
nesting_event_id
event_id
nesting_event_id
event_id
nesting_event_id
event_id
nesting_event_id
event_id
nesting_event_id
event_id
nesting_event_id
event_id
nesting_event_id
event_id
nesting_event_id
Transactions Statements Stages Waits
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Need and Design
Instruments and instrumentation
Statistics tables
Use cases
What’s new in MySQL 5.7
1
2
3
4
5
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What’s new in MySQL 5.7
2525
EnhancementsNew
Instruments
transactionsMemory
usage
Stored
programs
Prepared
statements
Metadata
locks
Connection
type InnoDB
Stages
User
variables
Replication
summary
tables
History per
session
Scalable
memory
allocation
Configurable
digest size
…
MySQL 5.7
Global/Session
variables/status
87 Tables and 1000+ Instruments
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
SYS Schema (earlier known as P_S Helper)
What’s new in MySQL 5.7
Procedures Functions Views
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thank You

More Related Content

What's hot

What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
Maria Colgan
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)
pasalapudi123
 
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
Trivadis
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMark Leith
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12c
Maria Colgan
 
LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...
LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...
LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...
Sandesh Rao
 
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
Maris Elsins
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at Oracle
Sandesh Rao
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
Abel Flórez
 
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEAIntroduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Sandesh Rao
 
Session 319
Session 319Session 319
Session 319
Bobby Curtis
 
Oracle RAC 19c with Standard Edition (SE) 2 - Support Update
Oracle RAC 19c with Standard Edition (SE) 2 - Support UpdateOracle RAC 19c with Standard Edition (SE) 2 - Support Update
Oracle RAC 19c with Standard Edition (SE) 2 - Support Update
Markus Michalewicz
 
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
Sandesh Rao
 
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in OracleProtect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Nelson Calero
 
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
Kellyn Pot'Vin-Gorman
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
Ståle Deraas
 
Oracle Database In-Memory Advisor (English)
Oracle Database In-Memory Advisor (English)Oracle Database In-Memory Advisor (English)
Oracle Database In-Memory Advisor (English)
Ileana Somesan
 
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší novéhoOracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
MarketingArrowECS_CZ
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise MonitorMario Beck
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
Jeff Smith
 

What's hot (20)

What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)
 
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12c
 
LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...
LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...
LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Dat...
 
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at Oracle
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
 
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEAIntroduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
 
Session 319
Session 319Session 319
Session 319
 
Oracle RAC 19c with Standard Edition (SE) 2 - Support Update
Oracle RAC 19c with Standard Edition (SE) 2 - Support UpdateOracle RAC 19c with Standard Edition (SE) 2 - Support Update
Oracle RAC 19c with Standard Edition (SE) 2 - Support Update
 
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
 
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in OracleProtect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
 
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
 
Oracle Database In-Memory Advisor (English)
Oracle Database In-Memory Advisor (English)Oracle Database In-Memory Advisor (English)
Oracle Database In-Memory Advisor (English)
 
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší novéhoOracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
 

Viewers also liked

Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15
Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15
Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15Phi Phi
 
Libro de ejercicios word 2007
Libro de ejercicios word 2007Libro de ejercicios word 2007
Libro de ejercicios word 2007Murxdio
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Encuestas producto a y b spss resultados
Encuestas producto a y b spss resultadosEncuestas producto a y b spss resultados
Encuestas producto a y b spss resultados
A Sergio Correoso
 
Summer in Salla 2013
Summer in Salla 2013Summer in Salla 2013
Summer in Salla 2013visitsalla
 
Ruth's (u) OWBC 31: When You Find You're A Broken Down Critter
Ruth's (u) OWBC 31: When You Find You're A Broken Down CritterRuth's (u) OWBC 31: When You Find You're A Broken Down Critter
Ruth's (u) OWBC 31: When You Find You're A Broken Down Critter
esme iolanthe
 
Fuchs That! A Trailer Park Challenge #5
Fuchs That! A Trailer Park Challenge #5Fuchs That! A Trailer Park Challenge #5
Fuchs That! A Trailer Park Challenge #5
esme iolanthe
 
Inovação esamc
Inovação esamcInovação esamc
Inovação esamc
Daniel de Carvalho Luz
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
Mark Leith
 
Aula - Planejamento para Competitividade
Aula - Planejamento para CompetitividadeAula - Planejamento para Competitividade
Aula - Planejamento para Competitividade
Daniel de Carvalho Luz
 
Indah r.a xii ips 2
Indah r.a xii ips 2Indah r.a xii ips 2
Indah r.a xii ips 2Paarief Udin
 

Viewers also liked (14)

Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15
Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15
Nlnn 51 0_cap nuoc sinh hoat va cong nghiep15
 
Libro de ejercicios word 2007
Libro de ejercicios word 2007Libro de ejercicios word 2007
Libro de ejercicios word 2007
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Virus informaticos
Virus informaticosVirus informaticos
Virus informaticos
 
Encuestas producto a y b spss resultados
Encuestas producto a y b spss resultadosEncuestas producto a y b spss resultados
Encuestas producto a y b spss resultados
 
1 harper-kp-keynote
1 harper-kp-keynote1 harper-kp-keynote
1 harper-kp-keynote
 
Summer in Salla 2013
Summer in Salla 2013Summer in Salla 2013
Summer in Salla 2013
 
ISMAIL
ISMAILISMAIL
ISMAIL
 
Ruth's (u) OWBC 31: When You Find You're A Broken Down Critter
Ruth's (u) OWBC 31: When You Find You're A Broken Down CritterRuth's (u) OWBC 31: When You Find You're A Broken Down Critter
Ruth's (u) OWBC 31: When You Find You're A Broken Down Critter
 
Fuchs That! A Trailer Park Challenge #5
Fuchs That! A Trailer Park Challenge #5Fuchs That! A Trailer Park Challenge #5
Fuchs That! A Trailer Park Challenge #5
 
Inovação esamc
Inovação esamcInovação esamc
Inovação esamc
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
Aula - Planejamento para Competitividade
Aula - Planejamento para CompetitividadeAula - Planejamento para Competitividade
Aula - Planejamento para Competitividade
 
Indah r.a xii ips 2
Indah r.a xii ips 2Indah r.a xii ips 2
Indah r.a xii ips 2
 

Similar to MySQL Performance Schema, Open Source India, 2015

OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLOUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
Georgi Kodinov
 
Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016
Mayank Prasad
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
Ivan Ma
 
MySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMario Beck
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
 
Oracle Management Cloud
Oracle Management Cloud Oracle Management Cloud
Oracle Management Cloud
Dheeraj Hiremath
 
Oracle Management Cloud
Oracle Management CloudOracle Management Cloud
Oracle Management Cloud
Dheeraj Hiremath
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
Sveta Smirnova
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
GeneXus
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suite
aioughydchapter
 
Oracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suiteOracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suite
OTN Systems Hub
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
MySQL Brasil
 
Database Basics with PHP -- Connect JS Conference October 17th, 2015
Database Basics with PHP -- Connect JS Conference October 17th, 2015Database Basics with PHP -- Connect JS Conference October 17th, 2015
Database Basics with PHP -- Connect JS Conference October 17th, 2015
Dave Stokes
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Frazer Clement
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
Women in Technology Poland
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
Mark Swarbrick
 
Oracle GoldenGate Performance Tuning
Oracle GoldenGate Performance TuningOracle GoldenGate Performance Tuning
Oracle GoldenGate Performance Tuning
Bobby Curtis
 
Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7
Mark Leith
 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0
Sandesh Rao
 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0
Gareth Chapman
 

Similar to MySQL Performance Schema, Open Source India, 2015 (20)

OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLOUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
 
Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
 
MySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench Integration
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
Oracle Management Cloud
Oracle Management Cloud Oracle Management Cloud
Oracle Management Cloud
 
Oracle Management Cloud
Oracle Management CloudOracle Management Cloud
Oracle Management Cloud
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suite
 
Oracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suiteOracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suite
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
Database Basics with PHP -- Connect JS Conference October 17th, 2015
Database Basics with PHP -- Connect JS Conference October 17th, 2015Database Basics with PHP -- Connect JS Conference October 17th, 2015
Database Basics with PHP -- Connect JS Conference October 17th, 2015
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
 
Oracle GoldenGate Performance Tuning
Oracle GoldenGate Performance TuningOracle GoldenGate Performance Tuning
Oracle GoldenGate Performance Tuning
 
Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7
 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0
 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 

MySQL Performance Schema, Open Source India, 2015

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Performance Schema Out of the Box in MySQL 5.7 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Mayank Prasad Principal Member Technical Staff Oracle, MySQL November 20, 2015
  • 2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following 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. 2
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Design Instruments and instrumentation Statistics tables Use cases What’s new in MySQL 5.7 1 2 3 4 5 3
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Design Instruments and instrumentation Statistics tables Use cases What’s new in MySQL 5.7 1 2 3 4 5 4
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Why Performance Schema? System Low throughput? ? 5 DBA Hot table? Network High traffic on link? Storage Too much Disk spin?App Developer Slow application? MySQL Developer Code contention? End User stuck session?
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Performance Schema : Design Block Diagram MySQL Server Instrumentation points (P_S hooks) P_S Internal Buffers P_S Storage Engine Storage Engine Interface Statistics Report Fetch Data SQL Query Collect Data Store Data P_S Tables 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Design Instruments and instrumentation Statistics tables Use cases What’s new in MySQL 5.7 1 2 3 4 5 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Instruments 8 • Name of monitored activity. • Tree like structure. Separated by ‘/’. • Left to right : More generic to more specific. • 1000+ instruments in MySQL 5.7. • Stored in setup_instruments table. wait/io/file/myisam/log statement/sql/select
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Design Instruments and instrumentation Statistics tables Use cases What’s new in MySQL 5.7 1 2 3 4 5 9
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Statistics Tables in Performance Schema 10 SETUP TABLES Instruments Actors Objects Consumers TIMERS EVENTS TABLES Transactions Statements Stages Waits Idle REPLICATION SUMMARY SYSTEM VARIABLES STATUS VARIABLES LOCK TABLES Metadata locks Table Handles SUMMARY TABLES Events Memory File I/O, Table I/O, Table locks Socket Connection … CONNECTION Attribute Type INSTANCE TABLES Mutex RW_locks File Sockets Cond MISC By_global By_thread By_user/host By_account By_digest
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Design Instruments and instrumentation Statistics tables Use cases What’s new in MySQL 5.7 1 2 3 4 5 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What does Performance Schema provide … update setup_instruments set ENABLED='YES', TIMED='YES'; 12 Connection 1 (Thread 24) start transaction; insert into test.t1 values('11'); commit; start transaction; insert into test.t1 values('12'); commit; start transaction; insert into test.t1 values('13'); commit; select * from test.t1; Connection 2 (Thread 25) start transaction; insert into test.t2 values('21'); commit; start transaction; insert into test.t2 values('22'); commit; Three inserts Two inserts Latest Statement
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What does Performance Schema provide … (cont.) Statements Statistics * Timer unit is PICOSECOND. EVENTS_STATEMENTS_CURRENT THREAD_ID 24 25 EVENT_NAME statement/sql /select statement/sql/ commit TIMER_WAIT 876585000 15998287000 SQL_TEXT select * from test.t1 commit ROWS_SENT 3 0 NO_INDEX_USED 0 0 SELECT_SCAN 1 0 13 EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT _NAME THREAD_ID 24 25 EVENT_NAME statement/sql /insert statement/sql /insert COUNT_STAR 3 2 SUM_TIMER_WAIT 35181659000 3477432000 SUM_ROWS_AFFECTED 3 2 SUM_SELECT_SCAN 0 0 SUM_NO_INDEX_USED 0 0
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What does Performance Schema provide … (cont.) Statements Statistics (cont.) * Timer unit is PICOSECOND. 14 EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME EVENT_NAME statement/sql/insert statement/sql/commit COUNT_STAR 5 5 SUM_TIMER_WAIT 38659091000 65812216000 … … SUM_ROWS_AFFECTED 5 0 … … …
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use case 1 Description 15 • Multiple queries running for long on MySQL Server • Few long running query (taking lots of time) • No idea which one • No idea why • What to do ? …
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use case 1 Diagnosis 16 – THREAD_ID: 25 – EVENT_ID: 89 – EVENT_NAME: statement/sql/select – SQL_TEXT : select bla bla bla…; • Wait ! There’s more! – SELECT_SCAN : 1 – NO_INDEX_USED: 1 • Aha !! SELECT * FROM events_statements_history WHERE TIMER_WAIT > ‘X’;
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use case 2 Statements giving errors ( or warnings) 17 SELECT DIGEST_TEXT, SCHEMA_NAME, COUNT_STAR, SUM_ERRORS, SUM_WARNINGS FROM events_statements_summary_by_digest WHERE SUM_ERRORS > 0 ORDER BY SUM_ERRORS DESC limit 1G; EVENTS_STATEMENTS_SUMMARY_BY_DIGEST DIGEST_TEXT CREATE TEMPORARY TABLE IF NOT ... _logs` ( `id` INT8 NOT NULL )! SCHEMA_NAME mem COUNT_STAR 1725 SUM_ERRORS 1725 SUM_WARNINGS 0 FIRST_SEEN 2014-05-20 10:42:32 LAST_SEEN 2014-05-21 18:39:22
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use case 3 Description 18 • Multithreaded environment • My session is stuck • No idea why • What to do ? …
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use case 3 • What T1 is waiting for – Say T1 is waiting for mutex_A (column OBJECT_INSTANCE_BEGIN) • Lets see who has taken this mutex_A – Ok, so thread T2 is holding mutex_A (column LOCKED_BY_THREAD_ID) • Find out what thread t2 is waiting for • And so on… SELECT * FROM mutex_instances WHERE OBJECT_INSTANCE_BEGIN = mutex_A; SELECT * FROM events_waits_current WHERE THREAD_ID = T2; Diagnosis 19 SELECT * FROM events_waits_current WHERE THREAD_ID = T1;
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Replication Summary Tables Tables for replication statistics 20 Replication status Connection Information Execute Information Connection Configuration Connection Status Execute Configuration Execute Status Coordinator/SQL Thread Worker Thread replication_connection _configuration replication_connection _status replication_execute_status _by_coordinator replication_execute_status _by_worker replication_execute _status replication_execute _configuration
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Replication Summary Tables Tables for replication statistics Table Information replication_connection_configuration (Host, Port, User etc.) replication_connection_status (Server UUID, Receiver thread ID, Service State etc.) replication_execute_configuration (Desired Delay) replication_execute_status (Remaining Delay) replication_execute_status_by_coordinator (Thread Id, Service State, Last Error info.) replication_execute_status_by_worker (WID, WTID, Service State, Last error Info.) 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Replication Summary Tables Tables for replication statistics 22 SHOW SLAVE STATUS (Limitations) – No logical division of information. – Lots of information packed together. – No cherry picking (difficult for automation). – Difficult to scale (more new fields). Why Performance Schema Tables? – Split logically into different tables. – SQL Interface. Fetch what is required. – Easier to extend.
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Event Hierarchy 23 event_id nesting_event_id event_id nesting_event_id event_id nesting_event_id event_id nesting_event_id event_id nesting_event_id event_id nesting_event_id event_id nesting_event_id event_id nesting_event_id Transactions Statements Stages Waits
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Design Instruments and instrumentation Statistics tables Use cases What’s new in MySQL 5.7 1 2 3 4 5 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What’s new in MySQL 5.7 2525 EnhancementsNew Instruments transactionsMemory usage Stored programs Prepared statements Metadata locks Connection type InnoDB Stages User variables Replication summary tables History per session Scalable memory allocation Configurable digest size … MySQL 5.7 Global/Session variables/status 87 Tables and 1000+ Instruments
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | SYS Schema (earlier known as P_S Helper) What’s new in MySQL 5.7 Procedures Functions Views
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thank You

Editor's Notes

  1. This is a Safe Harbor Front slide, one of two Safe Harbor Statement slides included in this template. One of the Safe Harbor slides must be used if your presentation covers material affected by Oracle’s Revenue Recognition Policy To learn more about this policy, e-mail: Revrec-americasiebc_us@oracle.com For internal communication, Safe Harbor Statements are not required. However, there is an applicable disclaimer (Exhibit E) that should be used, found in the Oracle Revenue Recognition Policy for Future Product Communications. Copy and paste this link into a web browser, to find out more information.   http://my.oracle.com/site/fin/gfo/GlobalProcesses/cnt452504.pdf For all external communications such as press release, roadmaps, PowerPoint presentations, Safe Harbor Statements are required. You can refer to the link mentioned above to find out additional information/disclaimers required depending on your audience.