In MySQL server we determine the physical/logical I/O with the help of a
query. The MySQL server maintains many status variables that provideinformation about its operation.
mysql> FLUSH STATUS; // -- In newer MySQLs, this clears the "SESSION" values //
mysql> SHOW SESSION STATUS LIKE 'Handler%';
Here, we show a table already create in my database.
mysql> SELECT * FROM person;
mysql> SHOW SESSION STATUS LIKE 'Handler%';
mysql> SHOW STATUS LIKE 'Up%';
Alas, the InnoDB STATUSes are global. So we need to capture them before and
after.
Worse yet, other queries will be bumping the values, too.
mysql> SHOW SESSION STATUS LIKE 'Innodb_buffer_pool%';
mysql> SHOW STATUS LIKE 'Innodb_buffer_pool%';
Resources
Here are some useful related resources: