Please note the difference between the information_schema
and performance_schema
databases
INFORMATION_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