SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
MySQL Performance Schema 
New enhancements in MySQL 5.7 (DMRs) 
MayankPrasad 
Principal Member Technical Staff 
Oracle, MySQL 
October 1, 2014 
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014,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 © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The Journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
3 
4 
5 
6 
3
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The Journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
3 
4 
5 
6 
4
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Why Performance Schema? 
SystemLow throughput? ? 
5 
DBAHot table? 
NetworkHigh traffic on link? 
StorageToo much disk spin? 
App Developer Slow application? 
MySQL Developer Code contention? 
End User Stuck session?
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
History and Origin 
“The Performance Schema is a mechanism to give user an insight of what is happening behind the sceneswhen MySQL server is running.” 
Development was started by Marc Alffin 2008. He is Chief Architect and Lead of Performance Schema Team (Christopher Powers and me) at Oracle-MySQL. 
Introduced in MySQL 5.5. 
•New storage engine : Performance Schema 
•New Database : performance_schema 
•Statistics stored in tables (hard-coded DDLs). 
•Non-persistent data. 
•SQL user interface. 
6
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7 Performance Schema : Design 
MySQL 
Server 
Instrumentation points(P_S hooks) 
P_S Internal Buffers 
P_SStorageEngine 
StorageEngineInterface 
StatisticsReport 
FetchData 
SQL Query 
Collect Data 
StoreDataP_STables 
7
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
3 
4 
5 
6 
8
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
The Journey : Then and now.. 
•MySQL 5.5 
•Only waits events 
–Mutexwaits 
–Conditions waits 
–R/W locks waits 
–File I/O waits 
•Setup_(timers/consumers/instruments) tables 
•Few summary tables 
•17Tables and 218 Instruments 
•MySQL 5.6 
•Statements and stages 
•Table, Index and network I/O. Table locks 
•Host Cache 
•User, account, host 
•Setup_(actor/objects) 
•Multiple summary tables 
•Events’ hierarchy 
•52Tables and 550Instruments 
•MySQL 5.7 (DMRs) 
•Instrumentation: 
–Transactions 
–Metadata locks 
–Prepared statements 
–Stored programs 
–Memory usage 
•User variables 
•Replication summary tables 
•76Tables and 885Instruments 
•… 
9
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The Journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
4 
3 
5 
6 
10
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Transaction Instrumentation 
•Exposes all aspects of Transactions within server 
•Implicit and Explicit 
•Quantitative (counts, timing) and Qualitative (isolation level) statistics 
•Aggregated across several dimensions (user, account, session etc.) 
•Statements to non-transactional tables are ignored (MyISAM) 
11
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Transaction Instrumentation (cont.) 
Transactions stats at runtime 
* Units in PICOSECONDs 
EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_ BY_EVENT_NAME 
THREAD_ID 
23 
EVENT_NAME 
Transaction 
COUNT_STAR 
3 
SUM_TIMER_WAIT 
18558993066000* 
… 
… 
COUNT_READ_WRITE 
3 
SUM_TIMER_READ_WRITE 
18558993066000* 
… 
… 
EVENTS_TRANSACTIONS_CURRENT 
THREAD_ID 
23 
EVENT_ID 
11 
EVENT_NAME 
Transaction 
STATE 
COMMITTED 
TIMER_WAIT 
22073180000* 
ACCESS_MODE 
READ WRITE 
ISOLATION LEVEL 
REPEATABLE READ 
AUTOCOMMIT 
NO 
12
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Event Hierarchy 
Session 
Transaction 
Statement* 
Stage(closing tables, preparing, optimizing) 
Wait 
(sync, lock, i/o) 
* Transactional tables only. 
13
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Event Hierarchy (cont.) 
An example 
START TRANSACTION; 
INSERT INTO test.t1 VALUES(‘3’); 
COMMIT; 
14
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Event Hierarchy (cont.) 
An example 
START TRANSACTION; 
INSERT INTO test.t1 VALUES(‘3’); 
COMMIT; 
15
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Metadata Locks Instrumentation 
METADATA_LOCKS 
OBJECT_TYPE: 
TABLE 
OBJECT_SCHEMA: 
test 
OBJECT_NAME: 
tab1 
LOCK_TYPE: 
SHARED_READ 
LOCK_DURATION: 
TRANSACTION 
LOCK_STATUS: 
GRANTED 
OWNER_THREAD_ID: 
23 
OWNER_EVENT_ID: 
41 
16 
wait/lock/metadata/sql/mdl 
•What are MDLs? 
•Exposes metadata lock dependencies between session. 
•Which session holds MDL 
•Which session waiting MDL 
•Lock request status 
–PENDING, GRANTED, KILLED, TIMEDOUT
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Stored Programs Instrumentation 
•New objects types in setup_objects. 
–PROCEDURE 
–FUNCTION 
–TRIGGER 
–EVENT 
•Can be configured individually. 
•Nesting is maintained. 
Triggers, Events, Functions, Procedures 
OBJECT_ TYPES 
OBJECT_ SCHEMA 
OBJECT_ NAME 
ENABLED 
TIMED 
TABLE 
test 
tab1 
YES 
NO 
PROCEDURE 
test 
proc1 
NO 
NO 
TRIGGER 
db1 
trg1 
YES 
YES 
FUNCTION 
% 
% 
NO 
NO 
EVENT 
% 
% 
NO 
NO 
SETUP_OBJECTS 
17
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Stored Programs Instrumentation (contd..) 
Example : 
create trigger test.trgbefore insert on test.tab1 for each row insert into test.tab2 values ('2'); 
create procedure test.proc() 
BEGIN 
select count(*) from test.tab1; 
insert into test.tab1 values('123'); 
END 
call test.proc(); 
EVENTS_STATEMENTS_SUMMARY_BY_PROGRAM 
OBJECT_TYPE 
OBJECT_ SCHEMA 
OBJECT_ NAME 
COUNT_ STAR 
SUM_TIMER_ WAIT 
COUNT_ STATEMENT 
SUM_STATEMENTS_ WAIT 
SUM_ ERRORS 
SUM_ROWS_ AFFECTED 
PROCEDURE 
test 
proc 
1 
21233759000 
2 
21126786000 
0 
1 
TRIGGER 
test 
trg 
1 
2001201000 
1 
1976505000 
0 
1 
18
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Stored Programs Instrumentation (contd..) 
Example : (Nesting) 
19 
EVENTS_STATEMENTS_HISTORY 
EVENT_ID 
461 
SQL_TEXT 
insert into d1.tab1 values('123') 
OBJECT_TYPE 
PROCEDURE 
OBJECT_NAME 
proc 
NESTING_EVENT_ID 
442 
EVENTS_STATEMENTS_HISTORY 
EVENT_ID 
469 
SQL_TEXT 
insert into d1.tab2 values ('2') 
OBJECT_TYPE 
TRIGGER 
OBJECT_NAME 
trg 
NESTING_EVENT_ID 
461
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Prepared Statements Instrumentation 
•What are Prepared Statements? 
•Exposes Prepared Statements in use by server. 
•Covers 
–PREPARE <stmt> 
–mysql_stmt_prepare() 
SQLCOM_PREPARE, COM_STMT_PREPARE 
20
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Prepared Statements Instrumentation (contd.) 
Example 
prepare stmt1from “select * from employee where emp_id=?”; 
Set @emp_id=12345; 
execute stmt1 USING @emp_id; 
EVENTS_STATEMENTS_HISTORY_LONG 
THREAD_ID: 20 
EVENT_ID: 4 
EVENT_NAME: statement/sql/prepare_sql 
SQL_TEXT: prepare stmt1 from "select * from employee where emp_id=?’;" 
… 
PREPARED_STATEMENTS_INSTANCES 
STATEMENT_ID: 1 
STATEMENT_NAME: stmt1 
SQL_TEXT: select * from employee where emp_id=? 
OWNER_THREAD_ID: 20 
OWNER_EVENT_ID: 4 
OWNER_OBJECT_TYPE: NULL 
OWNER_OBJECT_NAME: NULL 
COUNT_EXECUTE: 1 
21
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
User Variables 
•Exposes user-defined variables 
•Max name limit 64 
USER_VARIABLES_BY_THREAD 
Set @var_1=12345; 
-------- 
Set @var_2=67890; 
USER_VARIABLES_BY_THREAD 
THREAD_ID 
VARIABLE_NAME 
VARIABLE_VALUE 
23 
var_1 
12345 
24 
var_2 
67890 
22
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Memory Usage Instrumentation 
•Aspects covered : 
–Memory size 
–Operation Count (1M bytes once vs. 1 byte 1M times) 
–Low/high watermarks (spikes) 
•Aggregation 
–Type of memory (various cache, internal buffers) 
–Thread/account/user/host 
•Memory behavior of code/choice of design 
Who is taking what, how much and how many times. 
23
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Memory Usages Instrumentation (contd..) 
MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME 
EVENT_NAME 
memory/sql/TABLE 
COUNT_ALLOC 
1381 
COUNT_FREE 
924 
SUM_NUMBER_OF_BYTES_ALLOC 
2059873 
SUM_NUMBER_OF_BYTES_FREE 
1407432 
CURRENT_COUNT_USED 
457 
HIGH_COUNT_USED 
461 
CURRENT_NUMBER_OF_BYTES_USED 
652441 
HIGH_NUMBER_OF_BYTES_USED 
669269 
•Say : 
•T1 : 1MB-2MB 
•T2 : 10MB-12MB 
•Together : 
11MB -14MB 
24
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Replication Summary Tables 
Tables for replication statistics 
25 
•SHOW SLAVE STATUS (Limitations) 
–Lots of information packed together 
–No logical division of information 
–No cherry picking (difficult for automation) 
–Difficult to scale (more new fields) 
•Why Performance Schema Tables? 
–SQL Interface. Fetch what is required 
–Split logically into different tables 
–Easier to extend
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Replication Summary Tables 
Tables for replication statistics 
26 
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 © 2014,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, Receiverthread 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.) 
27
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The Journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
3 
5 
4 
6 
28
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Configuration 
•Build 
•Startup 
–Configuration file 
–Command line 
[mysqld] 
performance_schema_consumers_event_waits_history= ON 
. performance_schema_events_waits_history_size= 1000 
. performance_schema_instruments=‘statement/sql/% = COUNTED’ 
--performance_schema_consumers_event_waits_history= ON 
. --performance_schema_events_waits_history_size= 1000 
cmake. -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DDISABLE_PSI_MUTEX=1 
29
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Configuration (contd..) 
•Runtime 
•Auto tune (value=-1) 
–Use heuristics to compute 
•Max number of objects (mutex, rwlocks, files, sockets, threads etc.) 
•Memory for statistical data (history, history_long, digest etc.) 
•NOT ALL VARIABLES ARE AUTO TUNED. 
–Aligned with server tuning 
•Use hints from server variables 
update setup_consumersset ENABLED=‘NO’ where NAME=‘global_instrumentation’; 
. update setup_instrumentsset ENABLED=‘YES’ where NAME=‘statement/sql/%’; 
30 
max_connections 
table_open_cache 
table_definition_cache 
open_files_limit
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The Journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
3 
4 
6 
5 
31
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
An Example 
•Lets say thread, with thread id T0, is trying to alter a table tab1 and is hung. 
•Now, what T0 is waiting for 
–LOCK_STATUS=PENDING and OBJECT_NAME=‘tab1’ 
•Lets see who has taken MDL on table tab1. 
–Thread T1 (column OWNER_THREAD_ID) is holding MDL. 
•Is T1 waiting for some MDL? 
SELECT * FROM metadata_locksWHERE THREAD_ID = T0; 
SELECT * FROM metadata_locksWHERE OBJECT_NAME=‘tab1’, LOCK_STATUS=GRANTED; 
SELECT * FROM metadata_locksWHERE OWNER_THREAD_ID = T1, LOCK_STATUS=PENDING; 
Diagnose a stuck session 
32
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
An Example (contd…) 
•If T1 is not waiting for a MDL, then ? 
•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 
SELECT * FROM events_waits_currentWHERE THREAD_ID = T1; 
SELECT * FROM mutex_instancesWHERE OBJECT_INSTANCE_BEGIN = mutex_A; 
SELECT * FROM events_waits_currentWHERE THREAD_ID = T2; 
Diagnose a stuck session 
33
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
References 
34 
•Blogs: 
–http://marcalff.blogspot.com/ 
–http://www.markleith.co.uk/ 
–http://mayankmysql.blogspot.in/ 
•Performance Blog: 
–http://dimitrik.free.fr/ 
•MySQL documentation: 
–http://dev.mysql.com/doc/refman/5.7/en/performance-schema.html/
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 
Program Agenda 
Need and Origin 
The Journey : Then and now … 
New in MySQL-5.7 (DMRs) 
Configuration 
An example 
Q&A 
1 
2 
4 
5 
6 
3 
35
Thank You! Q&A ? 
Copyright © 2014,Oracle and/or its affiliates. All rights reserved. |

Más contenido relacionado

La actualidad más candente

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
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaMark Leith
 
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 - OGBEMEASandesh 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 OracleNelson Calero
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at OracleSandesh Rao
 
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
 
ORAchk EXAchk what's new in 12.1.0.2.7
ORAchk EXAchk what's new in 12.1.0.2.7ORAchk EXAchk what's new in 12.1.0.2.7
ORAchk EXAchk what's new in 12.1.0.2.7Sandesh Rao
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorMark Leith
 
AIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should know
AIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should knowAIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should know
AIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should knowSandesh Rao
 
Best Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerBest Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerEdgar Alejandro Villegas
 
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RACAUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RACSandesh Rao
 
How to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmeaHow to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmeaSandesh Rao
 
Exadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold StoryExadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold StoryEnkitec
 
Oracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationOracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationFrancisco Alvarez
 
Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL ClusterAbel Flórez
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMark Leith
 
20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous Database20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous DatabaseSandesh Rao
 
Exachk Customer Presentation
Exachk Customer PresentationExachk Customer Presentation
Exachk Customer PresentationSandesh Rao
 
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...Sandesh Rao
 

La actualidad más candente (20)

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
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
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
 
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
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at Oracle
 
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...
 
ORAchk EXAchk what's new in 12.1.0.2.7
ORAchk EXAchk what's new in 12.1.0.2.7ORAchk EXAchk what's new in 12.1.0.2.7
ORAchk EXAchk what's new in 12.1.0.2.7
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise Monitor
 
AIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should know
AIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should knowAIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should know
AIOUG : ODEVCYathra 2018 - Oracle Autonomous Database What Every DBA should know
 
Best Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerBest Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle Optimizer
 
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RACAUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
 
How to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmeaHow to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmea
 
Exadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold StoryExadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold Story
 
Oracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationOracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c Presentation
 
Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL Cluster
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema Improvements
 
20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous Database20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous Database
 
Exachk Customer Presentation
Exachk Customer PresentationExachk Customer Presentation
Exachk Customer Presentation
 
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
 

Similar a MySQL-Performance Schema- What's new in MySQL-5.7 DMRs

MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaSveta Smirnova
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance TuningMark Swarbrick
 
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.7Mark Leith
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschemaIvan Ma
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Morgan Tocker
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001jucaab
 
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdfyishengxi
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL PerformanceTommy Lee
 
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 suiteaioughydchapter
 
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
 
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
 
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 MySQLGeorgi Kodinov
 
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]vasuballa
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep diveMark Leith
 
MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksDave Stokes
 
OOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business SuiteOOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business Suitevasuballa
 
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.0Sandesh 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.0Gareth Chapman
 

Similar a MySQL-Performance Schema- What's new in MySQL-5.7 DMRs (20)

MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - 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
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001
 
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
 
JavaMicroBenchmarkpptm
JavaMicroBenchmarkpptmJavaMicroBenchmarkpptm
JavaMicroBenchmarkpptm
 
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
 
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)
 
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...
 
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
 
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disks
 
OOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business SuiteOOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business Suite
 
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
 

Último

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 

Último (20)

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 

MySQL-Performance Schema- What's new in MySQL-5.7 DMRs

  • 1. MySQL Performance Schema New enhancements in MySQL 5.7 (DMRs) MayankPrasad Principal Member Technical Staff Oracle, MySQL October 1, 2014 Copyright © 2014,Oracle and/or its affiliates. All rights reserved. |
  • 2. Copyright © 2014,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 © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The Journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 3 4 5 6 3
  • 4. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The Journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 3 4 5 6 4
  • 5. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Why Performance Schema? SystemLow throughput? ? 5 DBAHot table? NetworkHigh traffic on link? StorageToo much disk spin? App Developer Slow application? MySQL Developer Code contention? End User Stuck session?
  • 6. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | History and Origin “The Performance Schema is a mechanism to give user an insight of what is happening behind the sceneswhen MySQL server is running.” Development was started by Marc Alffin 2008. He is Chief Architect and Lead of Performance Schema Team (Christopher Powers and me) at Oracle-MySQL. Introduced in MySQL 5.5. •New storage engine : Performance Schema •New Database : performance_schema •Statistics stored in tables (hard-coded DDLs). •Non-persistent data. •SQL user interface. 6
  • 7. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Performance Schema : Design MySQL Server Instrumentation points(P_S hooks) P_S Internal Buffers P_SStorageEngine StorageEngineInterface StatisticsReport FetchData SQL Query Collect Data StoreDataP_STables 7
  • 8. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 3 4 5 6 8
  • 9. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | The Journey : Then and now.. •MySQL 5.5 •Only waits events –Mutexwaits –Conditions waits –R/W locks waits –File I/O waits •Setup_(timers/consumers/instruments) tables •Few summary tables •17Tables and 218 Instruments •MySQL 5.6 •Statements and stages •Table, Index and network I/O. Table locks •Host Cache •User, account, host •Setup_(actor/objects) •Multiple summary tables •Events’ hierarchy •52Tables and 550Instruments •MySQL 5.7 (DMRs) •Instrumentation: –Transactions –Metadata locks –Prepared statements –Stored programs –Memory usage •User variables •Replication summary tables •76Tables and 885Instruments •… 9
  • 10. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The Journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 4 3 5 6 10
  • 11. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Transaction Instrumentation •Exposes all aspects of Transactions within server •Implicit and Explicit •Quantitative (counts, timing) and Qualitative (isolation level) statistics •Aggregated across several dimensions (user, account, session etc.) •Statements to non-transactional tables are ignored (MyISAM) 11
  • 12. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Transaction Instrumentation (cont.) Transactions stats at runtime * Units in PICOSECONDs EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_ BY_EVENT_NAME THREAD_ID 23 EVENT_NAME Transaction COUNT_STAR 3 SUM_TIMER_WAIT 18558993066000* … … COUNT_READ_WRITE 3 SUM_TIMER_READ_WRITE 18558993066000* … … EVENTS_TRANSACTIONS_CURRENT THREAD_ID 23 EVENT_ID 11 EVENT_NAME Transaction STATE COMMITTED TIMER_WAIT 22073180000* ACCESS_MODE READ WRITE ISOLATION LEVEL REPEATABLE READ AUTOCOMMIT NO 12
  • 13. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Event Hierarchy Session Transaction Statement* Stage(closing tables, preparing, optimizing) Wait (sync, lock, i/o) * Transactional tables only. 13
  • 14. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Event Hierarchy (cont.) An example START TRANSACTION; INSERT INTO test.t1 VALUES(‘3’); COMMIT; 14
  • 15. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Event Hierarchy (cont.) An example START TRANSACTION; INSERT INTO test.t1 VALUES(‘3’); COMMIT; 15
  • 16. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Metadata Locks Instrumentation METADATA_LOCKS OBJECT_TYPE: TABLE OBJECT_SCHEMA: test OBJECT_NAME: tab1 LOCK_TYPE: SHARED_READ LOCK_DURATION: TRANSACTION LOCK_STATUS: GRANTED OWNER_THREAD_ID: 23 OWNER_EVENT_ID: 41 16 wait/lock/metadata/sql/mdl •What are MDLs? •Exposes metadata lock dependencies between session. •Which session holds MDL •Which session waiting MDL •Lock request status –PENDING, GRANTED, KILLED, TIMEDOUT
  • 17. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Stored Programs Instrumentation •New objects types in setup_objects. –PROCEDURE –FUNCTION –TRIGGER –EVENT •Can be configured individually. •Nesting is maintained. Triggers, Events, Functions, Procedures OBJECT_ TYPES OBJECT_ SCHEMA OBJECT_ NAME ENABLED TIMED TABLE test tab1 YES NO PROCEDURE test proc1 NO NO TRIGGER db1 trg1 YES YES FUNCTION % % NO NO EVENT % % NO NO SETUP_OBJECTS 17
  • 18. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Stored Programs Instrumentation (contd..) Example : create trigger test.trgbefore insert on test.tab1 for each row insert into test.tab2 values ('2'); create procedure test.proc() BEGIN select count(*) from test.tab1; insert into test.tab1 values('123'); END call test.proc(); EVENTS_STATEMENTS_SUMMARY_BY_PROGRAM OBJECT_TYPE OBJECT_ SCHEMA OBJECT_ NAME COUNT_ STAR SUM_TIMER_ WAIT COUNT_ STATEMENT SUM_STATEMENTS_ WAIT SUM_ ERRORS SUM_ROWS_ AFFECTED PROCEDURE test proc 1 21233759000 2 21126786000 0 1 TRIGGER test trg 1 2001201000 1 1976505000 0 1 18
  • 19. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Stored Programs Instrumentation (contd..) Example : (Nesting) 19 EVENTS_STATEMENTS_HISTORY EVENT_ID 461 SQL_TEXT insert into d1.tab1 values('123') OBJECT_TYPE PROCEDURE OBJECT_NAME proc NESTING_EVENT_ID 442 EVENTS_STATEMENTS_HISTORY EVENT_ID 469 SQL_TEXT insert into d1.tab2 values ('2') OBJECT_TYPE TRIGGER OBJECT_NAME trg NESTING_EVENT_ID 461
  • 20. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Prepared Statements Instrumentation •What are Prepared Statements? •Exposes Prepared Statements in use by server. •Covers –PREPARE <stmt> –mysql_stmt_prepare() SQLCOM_PREPARE, COM_STMT_PREPARE 20
  • 21. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Prepared Statements Instrumentation (contd.) Example prepare stmt1from “select * from employee where emp_id=?”; Set @emp_id=12345; execute stmt1 USING @emp_id; EVENTS_STATEMENTS_HISTORY_LONG THREAD_ID: 20 EVENT_ID: 4 EVENT_NAME: statement/sql/prepare_sql SQL_TEXT: prepare stmt1 from "select * from employee where emp_id=?’;" … PREPARED_STATEMENTS_INSTANCES STATEMENT_ID: 1 STATEMENT_NAME: stmt1 SQL_TEXT: select * from employee where emp_id=? OWNER_THREAD_ID: 20 OWNER_EVENT_ID: 4 OWNER_OBJECT_TYPE: NULL OWNER_OBJECT_NAME: NULL COUNT_EXECUTE: 1 21
  • 22. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | User Variables •Exposes user-defined variables •Max name limit 64 USER_VARIABLES_BY_THREAD Set @var_1=12345; -------- Set @var_2=67890; USER_VARIABLES_BY_THREAD THREAD_ID VARIABLE_NAME VARIABLE_VALUE 23 var_1 12345 24 var_2 67890 22
  • 23. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Memory Usage Instrumentation •Aspects covered : –Memory size –Operation Count (1M bytes once vs. 1 byte 1M times) –Low/high watermarks (spikes) •Aggregation –Type of memory (various cache, internal buffers) –Thread/account/user/host •Memory behavior of code/choice of design Who is taking what, how much and how many times. 23
  • 24. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Memory Usages Instrumentation (contd..) MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME EVENT_NAME memory/sql/TABLE COUNT_ALLOC 1381 COUNT_FREE 924 SUM_NUMBER_OF_BYTES_ALLOC 2059873 SUM_NUMBER_OF_BYTES_FREE 1407432 CURRENT_COUNT_USED 457 HIGH_COUNT_USED 461 CURRENT_NUMBER_OF_BYTES_USED 652441 HIGH_NUMBER_OF_BYTES_USED 669269 •Say : •T1 : 1MB-2MB •T2 : 10MB-12MB •Together : 11MB -14MB 24
  • 25. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Replication Summary Tables Tables for replication statistics 25 •SHOW SLAVE STATUS (Limitations) –Lots of information packed together –No logical division of information –No cherry picking (difficult for automation) –Difficult to scale (more new fields) •Why Performance Schema Tables? –SQL Interface. Fetch what is required –Split logically into different tables –Easier to extend
  • 26. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Replication Summary Tables Tables for replication statistics 26 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
  • 27. Copyright © 2014,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, Receiverthread 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.) 27
  • 28. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The Journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 3 5 4 6 28
  • 29. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Configuration •Build •Startup –Configuration file –Command line [mysqld] performance_schema_consumers_event_waits_history= ON . performance_schema_events_waits_history_size= 1000 . performance_schema_instruments=‘statement/sql/% = COUNTED’ --performance_schema_consumers_event_waits_history= ON . --performance_schema_events_waits_history_size= 1000 cmake. -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DDISABLE_PSI_MUTEX=1 29
  • 30. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Configuration (contd..) •Runtime •Auto tune (value=-1) –Use heuristics to compute •Max number of objects (mutex, rwlocks, files, sockets, threads etc.) •Memory for statistical data (history, history_long, digest etc.) •NOT ALL VARIABLES ARE AUTO TUNED. –Aligned with server tuning •Use hints from server variables update setup_consumersset ENABLED=‘NO’ where NAME=‘global_instrumentation’; . update setup_instrumentsset ENABLED=‘YES’ where NAME=‘statement/sql/%’; 30 max_connections table_open_cache table_definition_cache open_files_limit
  • 31. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The Journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 3 4 6 5 31
  • 32. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | An Example •Lets say thread, with thread id T0, is trying to alter a table tab1 and is hung. •Now, what T0 is waiting for –LOCK_STATUS=PENDING and OBJECT_NAME=‘tab1’ •Lets see who has taken MDL on table tab1. –Thread T1 (column OWNER_THREAD_ID) is holding MDL. •Is T1 waiting for some MDL? SELECT * FROM metadata_locksWHERE THREAD_ID = T0; SELECT * FROM metadata_locksWHERE OBJECT_NAME=‘tab1’, LOCK_STATUS=GRANTED; SELECT * FROM metadata_locksWHERE OWNER_THREAD_ID = T1, LOCK_STATUS=PENDING; Diagnose a stuck session 32
  • 33. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | An Example (contd…) •If T1 is not waiting for a MDL, then ? •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 SELECT * FROM events_waits_currentWHERE THREAD_ID = T1; SELECT * FROM mutex_instancesWHERE OBJECT_INSTANCE_BEGIN = mutex_A; SELECT * FROM events_waits_currentWHERE THREAD_ID = T2; Diagnose a stuck session 33
  • 34. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | References 34 •Blogs: –http://marcalff.blogspot.com/ –http://www.markleith.co.uk/ –http://mayankmysql.blogspot.in/ •Performance Blog: –http://dimitrik.free.fr/ •MySQL documentation: –http://dev.mysql.com/doc/refman/5.7/en/performance-schema.html/
  • 35. Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Program Agenda Need and Origin The Journey : Then and now … New in MySQL-5.7 (DMRs) Configuration An example Q&A 1 2 4 5 6 3 35
  • 36. Thank You! Q&A ? Copyright © 2014,Oracle and/or its affiliates. All rights reserved. |