- Add performance_schema=1 to my.cnf
- For table stats: select * from table_io_waits_summary_by_table
- For user stats: select * from events_statements_summary_by_account_by_event_name
Update - great advice from Mark Leith for MySQL 5.7 and newer
For table stats see the docs and run: SELECT * FROM sys.schema_table_statistics
For table stats see the docs and run: SELECT * FROM sys.schema_table_statistics
For user stats see the docs and run: SELECT * FROM sys.user_summary
Wow! I think this short guide was 5 years in the making! :)
ReplyDeleteMaybe closer to 10. User & table stats were in the Google patch prior to the Riga meeting (2008).
Delete