SlideShare a Scribd company logo
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
MySQL Performance Schema
A great insight of MySQL server execution​
Mayank Prasad
MySQL Developer
Oracle, MySQL
January 26, 2019
Copyright © 2019, 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 © 2019, 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 8.0 GA
1
2
3
4
5
3
Copyright © 2019, 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 8.0 GA
1
2
3
4
5
4
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Why Performance Schema?
?
5
Session
stuck?
Hot table?
Code
contention?
Slow
application?
Too much
disk spin?
Low
throughput?
High traffic
on link?
End User
MySQL Developer
Application Developer DBA
Storage
Network
System
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
What it is?
“Performance Schema is a mechanism to give user
an insight of what is happening behind the scene
when MySQL server is running.”
• 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
* No application change needed to use Performance Schema.
Copyright © 2019, 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
7
Copyright © 2019, 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 8.0 GA
1
2
3
4
5
8
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Instruments
9
• Name of monitored activity.
• Tree like structure. Separated by ‘/’.
• Left to right : More generic to more specific.
• 1200+ instruments in MySQL 8.0.
• Stored in performance_schema.setup_instruments table.
wait/io/file/myisam/log
statement/sql/select
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Instruments contd…
Table setup_instruments
10
SETUP_INSTRUMENTS
NAME ENABLED TIMED
statement/sql/select YES YES
statement/sql/create_table YES NO
statement/com/Create DB NO NO
… …
stage/sql/closing tables NO NO
stage/sql/Opening tables NO NO
stage/sql/optimizing YES YES
Copyright © 2019, 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 8.0 GA
1
2
3
4
5
11
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Statistics Tables in Performance Schema
12
SETUP
TABLES
Instruments
Actors
Objects
Consumers
*TIMERS
EVENTS
TABLES
Transactions
Statements
Stages
Waits
Idle
Error
REPLICATION
SUMMARY
VARIABLES
System
Session
Variable info
LOCK TABLES
Metadata
locks
Table Handles
DATA_LOCKS
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 © 2019, 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 8.0 GA
1
2
3
4
5
13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
What does Performance Schema provide …
update performance_schema.setup_instruments set ENABLED='YES', TIMED='YES';
14
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;
Two
insertsThree
inserts
Latest
Statement
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
What does Performance Schema provide … (cont.)
Statements Statistics
* Timer unit in table output 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
15
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 © 2019, Oracle and/or its affiliates. All rights reserved. |
What does Performance Schema provide … (cont.)
Statements Statistics (cont.)
* Timer unit in table output is PICOSECOND.
16
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 © 2019, Oracle and/or its affiliates. All rights reserved. |
Use case 1
Problem statement
17
• 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 © 2019, Oracle and/or its affiliates. All rights reserved. |
Use case 1
Diagnosis
18
– 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 © 2019, Oracle and/or its affiliates. All rights reserved. |
Use case 2
Statements giving errors ( or warnings)
19
SELECT DIGEST_TEXT, SCHEMA_NAME, COUNT_STAR, SUM_ERRORS, SUM_WARNINGS
FROM performance_schema.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 © 2019, Oracle and/or its affiliates. All rights reserved. |
Use case 3
Problem Statement
20
• Multithreaded environment
• My session is stuck
• No idea why
• What to do ? …
Copyright © 2019, 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
21
SELECT * FROM events_waits_current WHERE THREAD_ID = T1;
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Event Hierarchy
Session
Transaction
*Statement
Stage
Wait
sync, lock, i/o
* Statements for non-transactions tables are not part of Transaction instrumentation.
22
Copyright © 2019, 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 © 2019, Oracle and/or its affiliates. All rights reserved. |
Event Hierarchy (contd..)
An example
Start transaction;
Insert into test.t1 values(‘3’);
Commit;
24
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Event Hierarchy (contd..)
An example
Start transaction;
Insert into test.t1 values(‘3’);
Commit;
25
Copyright © 2019, 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 8.0 GA
1
2
3
4
5
26
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 27
What’s new in MySQL 5.7
2727
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
Reduced
memory
foot print
MySQL 5.7
Global/Session
variables/status …
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 28
What’s new in MySQL 8.0
2828
EnhancementsNew
Instruments
Error
Variable info
DATA Locks
DATA Locks
Wait
Histograms
Plugin
component
Table service
Statement
Histograms
Digest
Query
Sample
PFS Indexes
MySQL 8.0
…
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Server Error Instrumentation
• New instrument : error
• Errors on running server are instrumented
• Handled and unhandled
• Aggregated across several dimensions (user, account, session etc.)
29
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Server Error Instrumentation (contd)
Example
30
Connection 1 (Thread 46)
mysql> select * from no_table;
ERROR 1146 (42S02): Table 'test.no_table' doesn't exist
mysql> select * from no_table;
ERROR 1146 (42S02): Table 'test.no_table' doesn't exist
Connection 2 (Thread 47)
mysql> use no_database;
ERROR 1049 (42000): Unknown database 'no_database‘
mysql> select * from no_table;
ERROR 1146 (42S02): Table 'test.no_table' doesn't exist
Thrice
error
Once
error
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Server Error Instrumentation (contd)
Error stats at runtime
EVENTS_ERRORS_SUMMARY_BY_THREAD_BY_ERROR
THREAD_ID 46 47 47
ERROR_NUMBER 1146 1146 1049
ERROR_NAME ER_NO_SUCH_TABLE ER_NO_SUCH_TABLE ER_BAD_DB_ERROR
SQL_STATE 42S02 42S02 42000
SUM_ERROR_RAISED 2 1 1
31
EVENTS_ERRORS_SUMMARY_GLOBAL_BY_ERROR
ERROR_NUMBER 1146 1049
ERROR_NAME ER_NO_SUCH_TABLE ER_BAD_DB_ERROR
SQL_STATE 42S02 42000
SUM_ERROR_RAISED 3 1
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Variable info
• Gives information about the server variables.
• Source [COMMAND_LINE, COMPILED, EXPLICIT, PERSISTED etc.]
• Min/max value
• Who/When
32
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Variable info (contd)
VARIABLES_INFO
VARIABLE_NAME max_connections
VARIABLE_SOURCE COMPILED
VARIABLE_PATH
MIN_VALUE 1
MAX_VALUE 100000
SET_TIME NULL
SET_USER NULL
SET_HOST NULL
33
VARIABLES_INFO
VARIABLE_NAME max_connections
VARIABLE_SOURCE PERSISTED
VARIABLE_PATH
/home/mayank/mysql-
bin/data/mysqld-auto.cnf
MIN_VALUE 1
MAX_VALUE 100000
SET_TIME 2019-01-25 16:56:22.381152
SET_USER root
SET_HOST localhost
SET PERSIST max_connections=47;
<restart server>
SELECT * FROM variables_info WHERE
VARIABLE_NAME='max_connections';
SELECT * FROM variables_info WHERE
VARIABLE_NAME='max_connections';
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
INDEXES on PFS tables
• Improve performance of running Performance Schema queries on MySQL server.
• Indexes are fixed. Can't be added/altered.
• Before, all rows fetched and then filtered.
• Now, rows are filtered at Performance Schema level.
34
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
INDEXES on PFS tables (contd)
Example
35
mysql> SELECT * FROM
performance_schema.variables_by_thread
IGNORE INDEX (primary)
WHERE thread_id = 49 AND
variable_name = 'time_zone';
+-----------+---------------+----------------+
| THREAD_ID | VARIABLE_NAME | VARIABLE_VALUE |
+-----------+---------------+----------------+
| 49 | time_zone | SYSTEM |
+-----------+---------------+----------------+
1 row in set (0.01 sec)
mysql> show session status
where variable_name like "%Handler_read%";
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| Handler_read_first | 0 |
| Handler_read_key | 0 |
| Handler_read_last | 0 |
| Handler_read_next | 0 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 0 |
| Handler_read_rnd_next | 291 |
+-----------------------+-------+
7 rows in set (0.02 sec)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
INDEXES on PFS tables (contd)
Example
36
mysql> SELECT * FROM
performance_schema.variables_by_thread
WHERE thread_id = 49 AND
variable_name = 'time_zone';
+-----------+---------------+----------------+
| THREAD_ID | VARIABLE_NAME | VARIABLE_VALUE |
+-----------+---------------+----------------+
| 49 | time_zone | SYSTEM |
+-----------+---------------+----------------+
1 row in set (0.01 sec)
mysql> show session status
where variable_name like "%Handler_read%";
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| Handler_read_first | 0 |
| Handler_read_key | 1 |
| Handler_read_last | 0 |
| Handler_read_next | 0 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 0 |
| Handler_read_rnd_next | 0 |
+-----------------------+-------+
7 rows in set (0.02 sec)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DATA LOCKS
• Transaction A is locking row R,
• Transaction B is waiting on this very same row,
• B is effectively blocked by A.
• The instrumentation is to expose in performance_schema tables:
- which data is locked (R),
- who owns the lock (A),
- who waits for the data (B).
37
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DATA LOCKS (contd)
Example
38
Session 1 (Thread Id 51)
mysql> create table test.t1 (c char(100));
Query OK, 0 rows affected (0.21 sec)
mysql> insert into t1 values ('blablabla');
Query OK, 1 row affected (0.10 sec)
mysql> SET autocommit=0;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t1 for update;
+-----------+
| c |
+-----------+
| blablabla |
+-----------+
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DATA LOCKS (contd)
39
Monitoring session
mysql> select ENGINE, ENGINE_TRANSACTION_ID, THREAD_ID, EVENT_ID,
OBJECT_SCHEMA, OBJECT_NAME, LOCK_TYPE, LOCK_MODE, LOCK_STATUS,
LOCK_DATA from performance_schema.data_locks;
+--------+-----------------------+-----------+----------+---------------+
| ENGINE | ENGINE_TRANSACTION_ID | THREAD_ID | EVENT_ID | OBJECT_SCHEMA |
+--------+-----------------------+-----------+----------+---------------+
| INNODB | 3610 | 51 | 23 | test |
| INNODB | 3610 | 51 | 23 | test |
| INNODB | 3610 | 51 | 23 | test |
+--------+-----------------------+-----------+----------+---------------+
-------------+-----------+-----------+-------------+------------------------+
OBJECT_NAME | LOCK_TYPE | LOCK_MODE | LOCK_STATUS | LOCK_DATA |
-------------+-----------+-----------+-------------+------------------------+
t1 | TABLE | IX | GRANTED | NULL |
t1 | RECORD | X | GRANTED | supremum pseudo-record |
t1 | RECORD | X | GRANTED | 0x000000000300 |
-----------+-----------+-------------+-------------+------------------------+
3 rows in set (0.00 sec)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DATA LOCKS (contd)
Example
40
Session 1 (Thread Id 51)
mysql> create table test.t1 (c char(100));
Query OK, 0 rows affected (0.21 sec)
mysql> insert into t1 values ('blablabla');
Query OK, 1 row affected (0.10 sec)
mysql> SET autocommit=0;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t1 for update;
+-----------+
| c |
+-----------+
| blablabla |
+-----------+
Session 2 (Thread Id 52)
mysql> select * from t1 for update;
<It goes for wait>
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DATA LOCKS (contd)
41
Monitoring session
mysql> select ENGINE, ENGINE_TRANSACTION_ID, THREAD_ID, EVENT_ID,
OBJECT_SCHEMA, OBJECT_NAME, LOCK_TYPE, LOCK_MODE, LOCK_STATUS,
LOCK_DATA from performance_schema.data_locks;
+--------+-----------------------+-----------+----------+---------------+
| ENGINE | ENGINE_TRANSACTION_ID | THREAD_ID | EVENT_ID | OBJECT_SCHEMA |
+--------+-----------------------+-----------+----------+---------------+
| INNODB | 3613 | 52 | 16 | test |
| INNODB | 3613 | 52 | 16 | test |
| INNODB | 3610 | 51 | 23 | test |
| INNODB | 3610 | 51 | 23 | test |
| INNODB | 3610 | 51 | 23 | test |
+--------+-----------------------+-----------+----------+---------------+
-------------+-----------+-----------+-------------+------------------------+
OBJECT_NAME | LOCK_TYPE | LOCK_MODE | LOCK_STATUS | LOCK_DATA |
-------------+-----------+-----------+-------------+------------------------+
t1 | TABLE | IX | GRANTED | NULL |
t1 | RECORD | X | WAITING | 0x000000000300 |
t1 | TABLE | IX | GRANTED | NULL |
t1 | RECORD | X | GRANTED | supremum pseudo-record |
t1 | RECORD | X | GRANTED | 0x000000000300 |
-----------+-----------+-------------+-------------+------------------------+
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Statement Histogram
• Statement instrument gives
- Max/Min/Avg timings
• Categorize statements in different buckets based on time.
42
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Statement Histogram (Contd)
43
EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST
SCHEMA_NAME test test test
DIGEST 50308…4b710 50308…4b710 2c88c…e0b4b
BUCKET_NUMBER 116 124 111
BUCKET_TIMER_LOW 1995262314 2884031503 1584893192
BUCKET_TIMER_HIGH 2089296130 3019951720 1659586907
BUCKET_QUANTILE 0.400000 1.000000 0.444444
40% of the queries of this digest are run
with latency lower then 2.08 ms.
100% of the queries of this digest are run
with latency lower then 3.01 ms.
* Timer unit in table output is PICOSECOND.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Statement Histogram (Contd)
44
EVENTS_STATEMENTS_SUMMARY_BY_DIGEST
SCHEMA_NAME test
DIGEST 50308…4b710
COUNT_STAR 26
SUM_TIMER_WAIT 44055882000
MIN_TIMER_WAIT 1184073000
AVG_TIMER_WAIT 1694457000
MAX_TIMER_WAIT 2395033000
…
QUANTILE_95 2290867652
QUANTILE_99 2398832919
QUANTILE_999 2398832919
95% of the time query was executed less then 2.29 ms.
99% of the time query was executed less then 2.39 ms.
99.9% of the time query was executed less then 2.39 ms.
* Timer unit in table output is PICOSECOND.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Plugin/Component TABLE service
• pfs_plugin_table : A new component service
• Two methods :
add_tables : plugin/component to add tables in performance schema
delete_tables : plugin/component to delete tables from performance schema
• An example plugin : pfs_example_plugin_employee implementation.
• An example component : pfs_example_component_population implementation.
• With above two examples, you can easily write your own tables to be exposed in PFS.
• Doxygen comment from code : Very detailed explanation with diagrams.
45
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DIGEST QUERY SAMPLE
• A Sample query for every digest
• New variable : performance_schema_max_digest_sample_age
• Sample query gets updated
- After ‘performance_schema_max_digest_sample_age’ seconds.
- New query time exceeds max time till now.
46
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
DIGEST QUERY SAMPLE (contd)
Example
47
Client Session
mysql> select * from t1 where c1<3;
mysql> select * from t1 where c1<4;
mysql> select * from t1 where c1<5;
EVENTS_STATEMENTS_SUMMARY_BY_DIGEST
SCHEMA_NAME test
DIGEST 2c88c…e0b4b
DIGEST_TEXT SELECT * FROM `t1` WHERE `c1` < ?
QUERY_SAMPLE_TEXT select * from t1 where c1<3
QUERY_SAMPLE_SEEN 2019-01-25 14:58:52.792232
QUERY_SAMPLE_TIMER_WAIT 2231073000
Same
Digest
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Instruments We have
• I/O operation
—file, table, network
• Locks
—mutex, r/w locks,
table locks, MDLs,
• Memory usage
• Connection type
• Errors
• DATA LOCKS
• Events
—transactions,
statements, stages,
waits, Idle
• Stored Programs
— Procedures,
Functions, Triggers,
Events
• User variables
• HISTOGRAMS
• Global/session variable
• Global/Session status
• Replication Summary Tables
• Individual and Historical stats
• Indexes on PFS tables
• Summarized stats by
- user
- host
- account
- thread
- global
48
100+ Tables and 1200+ Instruments
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
(earlier known as P_S Helper)
SYS Schema
Procedures Functions Views
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Thanks you !
Questions ?

More Related Content

What's hot

Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
Mohamed Farouk
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability Methods
Mydbops
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
YoungHeon (Roy) Kim
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
Miguel Araújo
 
Shipping Data from Postgres to Clickhouse, by Murat Kabilov, Adjust
Shipping Data from Postgres to Clickhouse, by Murat Kabilov, AdjustShipping Data from Postgres to Clickhouse, by Murat Kabilov, Adjust
Shipping Data from Postgres to Clickhouse, by Murat Kabilov, Adjust
Altinity Ltd
 
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
Severalnines
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
► Supreme Mandal ◄
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
Gianluca Hotz
 
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
Altinity Ltd
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
Tomas Vondra
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
NeoClova
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
ClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei MilovidovClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei Milovidov
Altinity Ltd
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
Federico Campoli
 
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZEMySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
Norvald Ryeng
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
Alexey Lesovsky
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
Altinity Ltd
 
ClickHouse Materialized Views: The Magic Continues
ClickHouse Materialized Views: The Magic ContinuesClickHouse Materialized Views: The Magic Continues
ClickHouse Materialized Views: The Magic Continues
Altinity Ltd
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to Have
Sveta Smirnova
 

What's hot (20)

Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability Methods
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
 
Shipping Data from Postgres to Clickhouse, by Murat Kabilov, Adjust
Shipping Data from Postgres to Clickhouse, by Murat Kabilov, AdjustShipping Data from Postgres to Clickhouse, by Murat Kabilov, Adjust
Shipping Data from Postgres to Clickhouse, by Murat Kabilov, Adjust
 
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
 
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 
ClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei MilovidovClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei Milovidov
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZEMySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
 
ClickHouse Materialized Views: The Magic Continues
ClickHouse Materialized Views: The Magic ContinuesClickHouse Materialized Views: The Magic Continues
ClickHouse Materialized Views: The Magic Continues
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to Have
 

Similar to MySQL Performance Schema in MySQL 8.0

Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016
Mayank Prasad
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasia
Mayank Prasad
 
MySQL Performance Schema, Open Source India, 2015
MySQL Performance Schema, Open Source India, 2015MySQL Performance Schema, Open Source India, 2015
MySQL Performance Schema, Open Source India, 2015
Mayank Prasad
 
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRsMySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
Mayank Prasad
 
Oracle CodeOne Foreign Keys Support in MySQL 8.0
Oracle CodeOne Foreign Keys Support in MySQL 8.0Oracle CodeOne Foreign Keys Support in MySQL 8.0
Oracle CodeOne Foreign Keys Support in MySQL 8.0
Dave Stokes
 
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
Dave Stokes
 
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'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
Mario Beck
 
MySQL Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and Monitoring
Mark Leith
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
Mark Swarbrick
 
2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server
Georgi Kodinov
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change Stream
Luís Soares
 
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
 
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
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS Schema
Ted Wennmark
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
Morgan Tocker
 
Using Machine Learning to Debug complex Oracle RAC Issues
Using Machine Learning  to Debug complex Oracle RAC IssuesUsing Machine Learning  to Debug complex Oracle RAC Issues
Using Machine Learning to Debug complex Oracle RAC Issues
Anil Nair
 
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 in MySQL 8.0 (20)

Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016Mysql Performance Schema - fossasia 2016
Mysql Performance Schema - fossasia 2016
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasia
 
MySQL Performance Schema, Open Source India, 2015
MySQL Performance Schema, Open Source India, 2015MySQL Performance Schema, Open Source India, 2015
MySQL Performance Schema, Open Source India, 2015
 
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRsMySQL-Performance Schema- What's new in MySQL-5.7 DMRs
MySQL-Performance Schema- What's new in MySQL-5.7 DMRs
 
Oracle CodeOne Foreign Keys Support in MySQL 8.0
Oracle CodeOne Foreign Keys Support in MySQL 8.0Oracle CodeOne Foreign Keys Support in MySQL 8.0
Oracle CodeOne Foreign Keys Support in MySQL 8.0
 
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
MySQL 8.0 Features -- Oracle CodeOne 2019, All Things Open 2019
 
Oracle Management Cloud
Oracle Management Cloud Oracle Management Cloud
Oracle Management Cloud
 
Oracle Management Cloud
Oracle Management CloudOracle Management Cloud
Oracle Management Cloud
 
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 Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and Monitoring
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change Stream
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
 
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
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS Schema
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
 
Using Machine Learning to Debug complex Oracle RAC Issues
Using Machine Learning  to Debug complex Oracle RAC IssuesUsing Machine Learning  to Debug complex Oracle RAC Issues
Using Machine Learning to Debug complex Oracle RAC Issues
 
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

RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
kumarjarun2010
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
CEPTES Software Inc
 
The Evolution of Remote Server Management
The Evolution of Remote Server ManagementThe Evolution of Remote Server Management
The Evolution of Remote Server Management
Bert Blevins
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
paysquare consultancy
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
Zilliz
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...
chetankumar9855
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 

Recently uploaded (20)

RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
 
The Evolution of Remote Server Management
The Evolution of Remote Server ManagementThe Evolution of Remote Server Management
The Evolution of Remote Server Management
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 

MySQL Performance Schema in MySQL 8.0

  • 1. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | MySQL Performance Schema A great insight of MySQL server execution​ Mayank Prasad MySQL Developer Oracle, MySQL January 26, 2019
  • 2. Copyright © 2019, 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 © 2019, 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 8.0 GA 1 2 3 4 5 3
  • 4. Copyright © 2019, 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 8.0 GA 1 2 3 4 5 4
  • 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Why Performance Schema? ? 5 Session stuck? Hot table? Code contention? Slow application? Too much disk spin? Low throughput? High traffic on link? End User MySQL Developer Application Developer DBA Storage Network System
  • 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | What it is? “Performance Schema is a mechanism to give user an insight of what is happening behind the scene when MySQL server is running.” • 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 * No application change needed to use Performance Schema.
  • 7. Copyright © 2019, 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 7
  • 8. Copyright © 2019, 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 8.0 GA 1 2 3 4 5 8
  • 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Instruments 9 • Name of monitored activity. • Tree like structure. Separated by ‘/’. • Left to right : More generic to more specific. • 1200+ instruments in MySQL 8.0. • Stored in performance_schema.setup_instruments table. wait/io/file/myisam/log statement/sql/select
  • 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Instruments contd… Table setup_instruments 10 SETUP_INSTRUMENTS NAME ENABLED TIMED statement/sql/select YES YES statement/sql/create_table YES NO statement/com/Create DB NO NO … … stage/sql/closing tables NO NO stage/sql/Opening tables NO NO stage/sql/optimizing YES YES
  • 11. Copyright © 2019, 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 8.0 GA 1 2 3 4 5 11
  • 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Statistics Tables in Performance Schema 12 SETUP TABLES Instruments Actors Objects Consumers *TIMERS EVENTS TABLES Transactions Statements Stages Waits Idle Error REPLICATION SUMMARY VARIABLES System Session Variable info LOCK TABLES Metadata locks Table Handles DATA_LOCKS 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
  • 13. Copyright © 2019, 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 8.0 GA 1 2 3 4 5 13
  • 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | What does Performance Schema provide … update performance_schema.setup_instruments set ENABLED='YES', TIMED='YES'; 14 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; Two insertsThree inserts Latest Statement
  • 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | What does Performance Schema provide … (cont.) Statements Statistics * Timer unit in table output 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 15 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
  • 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | What does Performance Schema provide … (cont.) Statements Statistics (cont.) * Timer unit in table output is PICOSECOND. 16 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 … … …
  • 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Use case 1 Problem statement 17 • 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 ? …
  • 18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Use case 1 Diagnosis 18 – 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’;
  • 19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Use case 2 Statements giving errors ( or warnings) 19 SELECT DIGEST_TEXT, SCHEMA_NAME, COUNT_STAR, SUM_ERRORS, SUM_WARNINGS FROM performance_schema.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
  • 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Use case 3 Problem Statement 20 • Multithreaded environment • My session is stuck • No idea why • What to do ? …
  • 21. Copyright © 2019, 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 21 SELECT * FROM events_waits_current WHERE THREAD_ID = T1;
  • 22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Event Hierarchy Session Transaction *Statement Stage Wait sync, lock, i/o * Statements for non-transactions tables are not part of Transaction instrumentation. 22
  • 23. Copyright © 2019, 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 © 2019, Oracle and/or its affiliates. All rights reserved. | Event Hierarchy (contd..) An example Start transaction; Insert into test.t1 values(‘3’); Commit; 24
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Event Hierarchy (contd..) An example Start transaction; Insert into test.t1 values(‘3’); Commit; 25
  • 26. Copyright © 2019, 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 8.0 GA 1 2 3 4 5 26
  • 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 27 What’s new in MySQL 5.7 2727 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 Reduced memory foot print MySQL 5.7 Global/Session variables/status …
  • 28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 28 What’s new in MySQL 8.0 2828 EnhancementsNew Instruments Error Variable info DATA Locks DATA Locks Wait Histograms Plugin component Table service Statement Histograms Digest Query Sample PFS Indexes MySQL 8.0 …
  • 29. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Server Error Instrumentation • New instrument : error • Errors on running server are instrumented • Handled and unhandled • Aggregated across several dimensions (user, account, session etc.) 29
  • 30. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Server Error Instrumentation (contd) Example 30 Connection 1 (Thread 46) mysql> select * from no_table; ERROR 1146 (42S02): Table 'test.no_table' doesn't exist mysql> select * from no_table; ERROR 1146 (42S02): Table 'test.no_table' doesn't exist Connection 2 (Thread 47) mysql> use no_database; ERROR 1049 (42000): Unknown database 'no_database‘ mysql> select * from no_table; ERROR 1146 (42S02): Table 'test.no_table' doesn't exist Thrice error Once error
  • 31. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Server Error Instrumentation (contd) Error stats at runtime EVENTS_ERRORS_SUMMARY_BY_THREAD_BY_ERROR THREAD_ID 46 47 47 ERROR_NUMBER 1146 1146 1049 ERROR_NAME ER_NO_SUCH_TABLE ER_NO_SUCH_TABLE ER_BAD_DB_ERROR SQL_STATE 42S02 42S02 42000 SUM_ERROR_RAISED 2 1 1 31 EVENTS_ERRORS_SUMMARY_GLOBAL_BY_ERROR ERROR_NUMBER 1146 1049 ERROR_NAME ER_NO_SUCH_TABLE ER_BAD_DB_ERROR SQL_STATE 42S02 42000 SUM_ERROR_RAISED 3 1
  • 32. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Variable info • Gives information about the server variables. • Source [COMMAND_LINE, COMPILED, EXPLICIT, PERSISTED etc.] • Min/max value • Who/When 32
  • 33. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Variable info (contd) VARIABLES_INFO VARIABLE_NAME max_connections VARIABLE_SOURCE COMPILED VARIABLE_PATH MIN_VALUE 1 MAX_VALUE 100000 SET_TIME NULL SET_USER NULL SET_HOST NULL 33 VARIABLES_INFO VARIABLE_NAME max_connections VARIABLE_SOURCE PERSISTED VARIABLE_PATH /home/mayank/mysql- bin/data/mysqld-auto.cnf MIN_VALUE 1 MAX_VALUE 100000 SET_TIME 2019-01-25 16:56:22.381152 SET_USER root SET_HOST localhost SET PERSIST max_connections=47; <restart server> SELECT * FROM variables_info WHERE VARIABLE_NAME='max_connections'; SELECT * FROM variables_info WHERE VARIABLE_NAME='max_connections';
  • 34. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | INDEXES on PFS tables • Improve performance of running Performance Schema queries on MySQL server. • Indexes are fixed. Can't be added/altered. • Before, all rows fetched and then filtered. • Now, rows are filtered at Performance Schema level. 34
  • 35. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | INDEXES on PFS tables (contd) Example 35 mysql> SELECT * FROM performance_schema.variables_by_thread IGNORE INDEX (primary) WHERE thread_id = 49 AND variable_name = 'time_zone'; +-----------+---------------+----------------+ | THREAD_ID | VARIABLE_NAME | VARIABLE_VALUE | +-----------+---------------+----------------+ | 49 | time_zone | SYSTEM | +-----------+---------------+----------------+ 1 row in set (0.01 sec) mysql> show session status where variable_name like "%Handler_read%"; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | Handler_read_first | 0 | | Handler_read_key | 0 | | Handler_read_last | 0 | | Handler_read_next | 0 | | Handler_read_prev | 0 | | Handler_read_rnd | 0 | | Handler_read_rnd_next | 291 | +-----------------------+-------+ 7 rows in set (0.02 sec)
  • 36. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | INDEXES on PFS tables (contd) Example 36 mysql> SELECT * FROM performance_schema.variables_by_thread WHERE thread_id = 49 AND variable_name = 'time_zone'; +-----------+---------------+----------------+ | THREAD_ID | VARIABLE_NAME | VARIABLE_VALUE | +-----------+---------------+----------------+ | 49 | time_zone | SYSTEM | +-----------+---------------+----------------+ 1 row in set (0.01 sec) mysql> show session status where variable_name like "%Handler_read%"; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | Handler_read_first | 0 | | Handler_read_key | 1 | | Handler_read_last | 0 | | Handler_read_next | 0 | | Handler_read_prev | 0 | | Handler_read_rnd | 0 | | Handler_read_rnd_next | 0 | +-----------------------+-------+ 7 rows in set (0.02 sec)
  • 37. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DATA LOCKS • Transaction A is locking row R, • Transaction B is waiting on this very same row, • B is effectively blocked by A. • The instrumentation is to expose in performance_schema tables: - which data is locked (R), - who owns the lock (A), - who waits for the data (B). 37
  • 38. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DATA LOCKS (contd) Example 38 Session 1 (Thread Id 51) mysql> create table test.t1 (c char(100)); Query OK, 0 rows affected (0.21 sec) mysql> insert into t1 values ('blablabla'); Query OK, 1 row affected (0.10 sec) mysql> SET autocommit=0; Query OK, 0 rows affected (0.00 sec) mysql> select * from t1 for update; +-----------+ | c | +-----------+ | blablabla | +-----------+
  • 39. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DATA LOCKS (contd) 39 Monitoring session mysql> select ENGINE, ENGINE_TRANSACTION_ID, THREAD_ID, EVENT_ID, OBJECT_SCHEMA, OBJECT_NAME, LOCK_TYPE, LOCK_MODE, LOCK_STATUS, LOCK_DATA from performance_schema.data_locks; +--------+-----------------------+-----------+----------+---------------+ | ENGINE | ENGINE_TRANSACTION_ID | THREAD_ID | EVENT_ID | OBJECT_SCHEMA | +--------+-----------------------+-----------+----------+---------------+ | INNODB | 3610 | 51 | 23 | test | | INNODB | 3610 | 51 | 23 | test | | INNODB | 3610 | 51 | 23 | test | +--------+-----------------------+-----------+----------+---------------+ -------------+-----------+-----------+-------------+------------------------+ OBJECT_NAME | LOCK_TYPE | LOCK_MODE | LOCK_STATUS | LOCK_DATA | -------------+-----------+-----------+-------------+------------------------+ t1 | TABLE | IX | GRANTED | NULL | t1 | RECORD | X | GRANTED | supremum pseudo-record | t1 | RECORD | X | GRANTED | 0x000000000300 | -----------+-----------+-------------+-------------+------------------------+ 3 rows in set (0.00 sec)
  • 40. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DATA LOCKS (contd) Example 40 Session 1 (Thread Id 51) mysql> create table test.t1 (c char(100)); Query OK, 0 rows affected (0.21 sec) mysql> insert into t1 values ('blablabla'); Query OK, 1 row affected (0.10 sec) mysql> SET autocommit=0; Query OK, 0 rows affected (0.00 sec) mysql> select * from t1 for update; +-----------+ | c | +-----------+ | blablabla | +-----------+ Session 2 (Thread Id 52) mysql> select * from t1 for update; <It goes for wait>
  • 41. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DATA LOCKS (contd) 41 Monitoring session mysql> select ENGINE, ENGINE_TRANSACTION_ID, THREAD_ID, EVENT_ID, OBJECT_SCHEMA, OBJECT_NAME, LOCK_TYPE, LOCK_MODE, LOCK_STATUS, LOCK_DATA from performance_schema.data_locks; +--------+-----------------------+-----------+----------+---------------+ | ENGINE | ENGINE_TRANSACTION_ID | THREAD_ID | EVENT_ID | OBJECT_SCHEMA | +--------+-----------------------+-----------+----------+---------------+ | INNODB | 3613 | 52 | 16 | test | | INNODB | 3613 | 52 | 16 | test | | INNODB | 3610 | 51 | 23 | test | | INNODB | 3610 | 51 | 23 | test | | INNODB | 3610 | 51 | 23 | test | +--------+-----------------------+-----------+----------+---------------+ -------------+-----------+-----------+-------------+------------------------+ OBJECT_NAME | LOCK_TYPE | LOCK_MODE | LOCK_STATUS | LOCK_DATA | -------------+-----------+-----------+-------------+------------------------+ t1 | TABLE | IX | GRANTED | NULL | t1 | RECORD | X | WAITING | 0x000000000300 | t1 | TABLE | IX | GRANTED | NULL | t1 | RECORD | X | GRANTED | supremum pseudo-record | t1 | RECORD | X | GRANTED | 0x000000000300 | -----------+-----------+-------------+-------------+------------------------+
  • 42. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Statement Histogram • Statement instrument gives - Max/Min/Avg timings • Categorize statements in different buckets based on time. 42
  • 43. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Statement Histogram (Contd) 43 EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST SCHEMA_NAME test test test DIGEST 50308…4b710 50308…4b710 2c88c…e0b4b BUCKET_NUMBER 116 124 111 BUCKET_TIMER_LOW 1995262314 2884031503 1584893192 BUCKET_TIMER_HIGH 2089296130 3019951720 1659586907 BUCKET_QUANTILE 0.400000 1.000000 0.444444 40% of the queries of this digest are run with latency lower then 2.08 ms. 100% of the queries of this digest are run with latency lower then 3.01 ms. * Timer unit in table output is PICOSECOND.
  • 44. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Statement Histogram (Contd) 44 EVENTS_STATEMENTS_SUMMARY_BY_DIGEST SCHEMA_NAME test DIGEST 50308…4b710 COUNT_STAR 26 SUM_TIMER_WAIT 44055882000 MIN_TIMER_WAIT 1184073000 AVG_TIMER_WAIT 1694457000 MAX_TIMER_WAIT 2395033000 … QUANTILE_95 2290867652 QUANTILE_99 2398832919 QUANTILE_999 2398832919 95% of the time query was executed less then 2.29 ms. 99% of the time query was executed less then 2.39 ms. 99.9% of the time query was executed less then 2.39 ms. * Timer unit in table output is PICOSECOND.
  • 45. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Plugin/Component TABLE service • pfs_plugin_table : A new component service • Two methods : add_tables : plugin/component to add tables in performance schema delete_tables : plugin/component to delete tables from performance schema • An example plugin : pfs_example_plugin_employee implementation. • An example component : pfs_example_component_population implementation. • With above two examples, you can easily write your own tables to be exposed in PFS. • Doxygen comment from code : Very detailed explanation with diagrams. 45
  • 46. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DIGEST QUERY SAMPLE • A Sample query for every digest • New variable : performance_schema_max_digest_sample_age • Sample query gets updated - After ‘performance_schema_max_digest_sample_age’ seconds. - New query time exceeds max time till now. 46
  • 47. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | DIGEST QUERY SAMPLE (contd) Example 47 Client Session mysql> select * from t1 where c1<3; mysql> select * from t1 where c1<4; mysql> select * from t1 where c1<5; EVENTS_STATEMENTS_SUMMARY_BY_DIGEST SCHEMA_NAME test DIGEST 2c88c…e0b4b DIGEST_TEXT SELECT * FROM `t1` WHERE `c1` < ? QUERY_SAMPLE_TEXT select * from t1 where c1<3 QUERY_SAMPLE_SEEN 2019-01-25 14:58:52.792232 QUERY_SAMPLE_TIMER_WAIT 2231073000 Same Digest
  • 48. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Instruments We have • I/O operation —file, table, network • Locks —mutex, r/w locks, table locks, MDLs, • Memory usage • Connection type • Errors • DATA LOCKS • Events —transactions, statements, stages, waits, Idle • Stored Programs — Procedures, Functions, Triggers, Events • User variables • HISTOGRAMS • Global/session variable • Global/Session status • Replication Summary Tables • Individual and Historical stats • Indexes on PFS tables • Summarized stats by - user - host - account - thread - global 48 100+ Tables and 1200+ Instruments
  • 49. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | (earlier known as P_S Helper) SYS Schema Procedures Functions Views
  • 50. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Thanks you ! Questions ?

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.