Announcement

Announcement Module
Collapse
No announcement yet.

Read/Write Ratio For A Table

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Read/Write Ratio For A Table

    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?

  • #2
    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.

    Comment

    Working...
    X