patternsqlMinor
How performance schema in mysql 5.6 improve performance?
Viewed 0 times
improvemysqlperformancehowschema
Problem
Since MySQL 5.5
As we know that tables in information_schema contains statistical information like tables, plugins, partitions, processlist, status and global variables etc.
Just like, performance_schema contains a lot of tables.
application based on MySQL 5.6?
performance_schema database has been added likewise information_schema.As we know that tables in information_schema contains statistical information like tables, plugins, partitions, processlist, status and global variables etc.
Just like, performance_schema contains a lot of tables.
- But, how can we use these tables to improve performance of an
application based on MySQL 5.6?
Solution
Please note the difference between the
INFORMATION_SCHEMA
The information_schema database is an inventory of all objects within the MySQL instance
Such objects include:
I wrote a nice post about this 3 years ago : How is INFORMATION_SCHEMA implemented in MySQL?
PERFORMANCE_SCHEMA
The performance_schema database is an instrumentation platform that collects statistics about phases of a running query. Such info can give you hints to tune the query or the environment. You only need to enable it when debugging and troubleshooting queries in conjunction with adding indexes (may or may not be necessary) and adjusting buffer settings (again, may or may not be necessary).
I have not written much about
Derek Downey also wrote a quick post on it : What is the usage of performance_schema in MySQL 5.5?
There is a wealth of information on how to use the
information_schema and performance_schema databasesINFORMATION_SCHEMA
The information_schema database is an inventory of all objects within the MySQL instance
Such objects include:
- databases
- tables
- columns
- constraints
- indexes (called statistics)
- processlist
- locks
I wrote a nice post about this 3 years ago : How is INFORMATION_SCHEMA implemented in MySQL?
PERFORMANCE_SCHEMA
The performance_schema database is an instrumentation platform that collects statistics about phases of a running query. Such info can give you hints to tune the query or the environment. You only need to enable it when debugging and troubleshooting queries in conjunction with adding indexes (may or may not be necessary) and adjusting buffer settings (again, may or may not be necessary).
I have not written much about
performance_schema since I do not use it that often (Mentioned in my old post Is there any way to get the estimate cost of executing a query in MySQL?).Derek Downey also wrote a quick post on it : What is the usage of performance_schema in MySQL 5.5?
There is a wealth of information on how to use the
performance_schema I think you will enjoy- PERFORMANCE_SCHEMA vs Slow Query Log
- PERFORMANCE_SCHEMA in MySQL 5.6: The Good, The Bad and The Ugly
- A Visual Guide to the MySQL Performance Schema
Context
StackExchange Database Administrators Q#71284, answer score: 7
Revisions (0)
No revisions yet.