SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Nikolas's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    1,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detecting overhead

    I have some tables in my database, that execute a lot of update/insert queries, with result, overhead in the table.

    I know that the solution to overhead is the OPTIMIZE statement, but as this statement is locking the table, it would be faster if I could detect if the table has overhead.

    So my question is how can I know (using SQL) if a table has overhead?

    Thanks in advance for any replies

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    http://dev.mysql.com/doc/refman/5.0/...le-status.html

    i think the column you're looking for is data_free

  3. #3
    SitePoint Wizard Nikolas's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    1,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much

  4. #4
    SitePoint Wizard Nikolas's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    1,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for the double post.

    I've just made a php script that checks the tables that have overhead, and optimize them (for all the databases in a server)

    If you want it, you can grab it from here :

    http://www.webdigity.com/index.php/t...matically.html


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •