0

how can i get IO stats per table in MySQL/MariaDB?

MariaDB [INFORMATION_SCHEMA]> SELECT * FROM INFORMATION_SCHEMA.table_io_waits_summary_by_table \G;
ERROR 1109 (42S02): Unknown table 'table_io_waits_summary_by_table' in information_schema
ERROR: No query specified

Here is the docs but I couldn't find anything:

https://dev.mysql.com/doc/refman/8.0/en/performance-schema-table-wait-summary-tables.html#performance-schema-table-io-waits-summary-by-table-table

1 Answers1

0

ERROR: No query specified comes from the ; redundantly after the \G.

Are you asking "How do I ..." Or are you asking "Why does table ... not exist"

In either case, please provide the version of MySQL/MariaDB you are using.

Please note that some tables have moved from information_schema to performance_schema. Check there. MySQL and MariaDB are very likely to have tables like this in different places, or not even have the table you want.

What is your real goal? Are you hoping to charge your users for I/O? Are you looking for information on the optimization of some query? (There are better approaches for this.) Or something else?

Rick James
  • 2,463
  • 1
  • 6
  • 13
  • Thank you sir, you saved my day! As you mentioned, I was looking in the wrong database. My goal is to charge users for I/O, any tips? – zdppfareex Apr 20 '21 at 22:05