1

When I searched some status variable by using below command and got:

mysql> show global status like '%key%';

+------------------------+--------+
| Variable_name          | Value  |
+------------------------+--------+
| Com_assign_to_keycache | 0      |
| Com_preload_keys       | 0      |
| Com_show_keys          | 0      |
| Handler_read_key       | 713132 |
| Key_blocks_not_flushed | 0      |
| Key_blocks_unused      | 14497  |
| Key_blocks_used        | 12     |
| Key_read_requests      | 48622  |
| Key_reads              | 0      |
| Key_write_requests     | 9384   |
| Key_writes             | 0      |
+------------------------+--------+
11 rows in set (0.00 sec)

I was curious about why both value of key_reads, and key_writes are 0, and googled. The blow link told me those key leading variables are used in MyIsam engine.

Why mysql status key_reads,key_reads_request's values are zero?

How do we know which variables are Innodb engine orientied, some are only used in MyIsam engine. Where I can find the document? Thanks for any input.

Community
  • 1
  • 1
user1342336
  • 967
  • 2
  • 16
  • 28

1 Answers1

2

Take a look at this page on server status variables. The documentation is not all-encompassing, and I would recommend you further search the internets if it falls short for a certain status variable. For example, key_reads wasn't mentioned having anything to do with only MyISAM, so you were right to do further digging. I've found slideshare to have some useful information: see this presentation, which contains some information on the various status variables. However, you'll probably not be able to know 100% about every variable listed without looking at MySQL server source code!

Hope some of this helps...

Erin Schoonover
  • 530
  • 2
  • 13
  • 1
    Regading this very variable (`key_reads`), the mention regarding it being MyISAM-only was [added in v5.6](http://dev.mysql.com/doc/refman/5.6/en/server-status-variables.html#statvar_Key_reads). Notice that MyISAM used to be the only storage available. I would believe that any documentation that does not mention InnoDB explicitely is likely to apply to MyISAM only. – RandomSeed May 17 '13 at 15:59