Re: What are the reasons for Fragmentation of tables?
Posted by: Rick James
Date: October 02, 2015 08:57PM

MyISAM or InnoDB? (The answer is quite different.) I'll assume InnoDB.

InnoDB data and indexes are structure in BTrees of 16KB blocks. The data is always ordered by the PRIMARY KEY. Each secondary index is always ordered by the secondary key column(s). It is much cheaper to leave gaps than to take the effort to squeeze them out.

BTree splits, usually caused by INSERTs.

Temporary extra copies of rows because transaction semantics.

DELETE leaving a gap.

Etc.

But why do you ask? The typical InnoDB has 10%-50% of the space 'empty' or 'free', hence 'fragmented'.

Options: ReplyQuote


Subject
Written By
Posted
Re: What are the reasons for Fragmentation of tables?
October 02, 2015 08:57PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.