In the last episode (Jul 28), leo huang said: > 2006/7/28, Chris <[EMAIL PROTECTED]>: > >leo huang wrote: > >> Because some paper say that when the row is deleted or update, > >> Innodb just make a mark that the row is deleted and it didn't > >> delete the rows. I can't find more information about the re-use > >> tablespace. Can you give me more? > > > >That's the way MVCC works. If you need full acid/transaction > >support, that's the only way it can do it (postgresql works exactly > >the same way). It can't just delete the row because you might roll > >back the transaction and it will have to undo that delete, or other > >transactions might be using it for whatever purpose. > > > >http://dev.mysql.com/doc/refman/5.1/en/innodb-multi-versioning.html > >http://dev.mysql.com/doc/refman/5.1/en/file-space-management.html > > So, the deleted rows' disk space in tablespace can't re-use when I > use Innodb, can it? And the tablespace is growing when we update the > tables, even the amount of rows do not increase.
It can be re-used after the transaction has been committed, but if there weren't enough deleted rows to cause a b-tree compaction, that free space can only be used by another row near the same parimary key value. InnoDB tables aren't like MyISAM tables, where a row can be stored any place in the .MYI file. In InnoDB, the entire table is a large b-tree index and each index block holds a small range of key values. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]