How can I go about determining the read/write ratio for a MyISAM table on a production server? Is there an equivalent statement to SHOW STATUS that operates on an individual table or set of tables?
None that I know of.
But you could solve it with two triggers.
Create a table
(accessType CHAR(20) NOT NULL, nrOfQueries INT NOT NULL)
and populate that table with only two records:
Then you create the two triggers:
CREATE TRIGGER ins_increment BEFORE INSERT:
nrOfQueries = nrOfQueries + 1
accessType = ‘nrOfInserts’;
CREATE TRIGGER select_increment BEFORE SELECT:
Or you can turn on full logging and count the individual types of queries in the log file.