Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
An Total Fix To Any Db Type
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-03-19 01:16:11
I know this addon will prob add an little lag issue when it runs but should fix any of the tables that are bad or erroneous.

replace in cleanup.php of 2.08 only



   $res = SQL_Query_exec("SHOW TABLES");

 

   while ( $table = mysql_fetch_row($res) )

   {

   SQL_Query_exec("OPTIMIZE TABLE `$table[0]`;");

   }



with




   $res = SQL_Query_exec("SHOW TABLES");

 

   while ( $table = mysql_fetch_row($res) )

   {

   // Get rid of overhead.

   SQL_Query_exec("REPAIR TABLE `$table[0]`;");

   // Analyze table for faster indexing.

   SQL_Query_exec("ANALYZE TABLE `$table[0]`;");

// Optimize table to minimize thrashing.

   SQL_Query_exec("OPTIMIZE TABLE `$table[0]`;");

   }





From what i been reading

OPTMIZE TABLE does not work that way with InnoDB for two major reasons:

REASON #1 : InnoDB Storage Layout

REASON #2 : Index Statistics are Always Recomputed

incase people wondering where I am getting this info from: http://stackoverflow.com/questions/7069010/how-to-fix-the-overhead-and-effective-problem-on-innodb-table
Unknown User
2012-03-21 10:07:03
Nice, i been meaning to make a function to fetch the tables and possibly use implode so the OPTIMIZE table query would be like

SQL_Query_exec("OPTIMIZE TABLE " . implode(', ', getTables() . ";");

im pretty sure the REPAIR command can take multiple arguments too.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728