Home » Performance » MySQL » Read/Write Ratio For A Table
Read/Write Ratio For A Table [message #2177] Thu, 08 November 2007 15:34 Go to next message
jramos  is currently offline jramos
Messages: 1
Registered: November 2007
Junior Member
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?
Re: Read/Write Ratio For A Table [message #2183 is a reply to message #2177 ] Fri, 09 November 2007 05:35 Go to previous message
sterin  is currently offline sterin
Messages: 324
Registered: March 2007
Location: Sweden
Senior Member
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:
nrOfInserts, 0
nrOfSelects, 0

Then you create the two triggers:
CREATE TRIGGER ins_increment BEFORE INSERT:
UPDATE
yourSummaryTable
SET
nrOfQueries = nrOfQueries + 1
WHERE
accessType = 'nrOfInserts';


CREATE TRIGGER select_increment BEFORE SELECT:
...
etc.



Or you can turn on full logging and count the individual types of queries in the log file.
Previous Topic:Joining multiple tables turns an indexed query into a temp/filesort
Next Topic:Erroneous queries = performance degradation
Goto Forum:
  


Current Time: Fri Jul 10 04:30:38 EDT 2009

Total time taken to generate the page: 0.02894 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.