A collection of views, functions, and procedures to help MySQL administrators gain insight into database usage.
The MySQL sys schema is a built-in diagnostic tool that provides a comprehensive set of views, functions, and procedures for monitoring and analyzing MySQL server performance. It helps administrators understand database activity, identify bottlenecks, and optimize system resources by presenting data from the Performance Schema and Information Schema in a more accessible format.
MySQL database administrators and performance engineers who need to monitor, troubleshoot, and optimize MySQL server performance. It's particularly useful for those managing production databases who require actionable insights without writing complex diagnostic queries.
Developers choose the sys schema because it transforms low-level performance data into human-readable insights, eliminating the need for complex manual queries. Its dual-format views (human-readable and tool-friendly x$ versions) and configurable behavior through the sys_config table provide flexibility that raw Performance Schema queries lack.
The MySQL sys schema
Provides aggregated metrics like host_summary for statement activity, file I/O, and connections, eliminating the need for complex manual queries against Performance Schema.
Offers both human-readable formatted views (e.g., host_summary) and raw x$ versions for tool integration, as shown in the README's structure examples.
Includes specialized views like innodb_buffer_stats_by_schema and innodb_lock_waits, giving detailed insights into buffer pool usage and lock contention.
Features a sys_config table to customize settings such as statement truncation length and diagnostic output, allowing tailored performance analysis.
Changes to sys_config table values are cached per session and don't take effect until re-login, hindering dynamic adjustments during live troubleshooting.
The README warns that objects have dependencies requiring careful loading order, and generating custom SQL files for environments like RDS adds setup steps.
Officially supports only MySQL 5.6 and 5.7 via provided scripts, leaving users on other versions to manually adapt or seek unofficial patches.
Adding numerous views, functions, and procedures can introduce query execution overhead, especially on servers already under high load.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.