I have 81 tables in an innodb database (MySQL). The data in them amounts to 2GB on disk. My queries rarely join more than 3 tables together at once. My innodb_buffer_pool size is about 2.1 GB.
Running mysqltuner.pl I get the following !!
[!!] Table cache hit rate: 7% (274 open / 3K opened)
From mysqlreport I see that I indeed have 274 open, have had 3K opened and that my ceiling for open is 400.
However, doing this
show status like '%open%'
gets this result
...
Open_table_definitions 161
Open_tables 274
Opened_files 150232
Opened_table_definitions 0
Opened_tables 0
Two questions:
1) Shouldn't the "opened tables" say 3K and not zero in the above result from show status like '%open%'?
2) Any advice on what I need to do to remedy this !! i.e. the low table cache hit rate?
Thanks
PS. If it helps, the second !! I have in mysqltuner.pl is this:
[!!] Temporary tables created on disk: 29% (35K on disk / 119K total)
YES, result came mostly from SHOW STATUS and SHOW VARIABLES and some basic calculus operations.
Table cache hit is due to: 1. too few table opened 2. Total number of table in all databases <<< open table cache size.