-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jim Hu wrote:
$wgDBtransactions gets set to true if using InnoDB tables. Is there an advantage to using InnoDB tables? The disadvantage is that with MySQL there is a file, ibdata1, that seems to grow endlessly if InnoDB tables are used. See
http://bugs.mysql.com/bug.php?id=1341
We're wondering if we should just convert everything to MyISAM. Any thoughts?
MyISAM tables are subject to a much higher likelihood of data corruption, and cannot be read consistently (eg for backups) without locking the database.
You may notice that the majority of complaints about corrupt tables involving MediaWiki are about the 'searchindex' table, which is created as MyISAM due to the requirements of the fulltext index.
In most wiki situations your database will indeed only grow, so the table space not reclaiming disk space on deletions is usually not a problem. In the wiki, all editing history is retained, and the space from the rare small records that are actually removed will simply be taken up by further edits.
If you for some reason want to import a lot of data, then delete it all, then never work with any database data ever again, well... that's pretty weird. ;) But as suggested in your link you can use per-table InnoDB spaces in recent versions of MySQL, or you can use the more fragile MyISAM tables, or you can "defragment" the table space by dumping it out, deleting the space, and reimporting it.
In some situations MyISAM tables may also be faster, which could be useful for certain kinds of statistical or other use.
- -- brion vibber (brion @ pobox.com)