MySQL Forums
Forum List  »  MyISAM

Re: Primary key performance int vs. char
Posted by: Ingo Strüwing
Date: July 27, 2005 05:26AM

This is a good explanation. But it is valid only as long as no key packing happens (see reference manual 13.1.5. CREATE TABLE Syntax, Section "PACK_KEYS").

With packed keys, only the first key in the page is stored with its full value. All following keys with the same value use only one byte (plus the data pointer as for every key). A changing key value within a page is stored only with the value behind a common prefix and a byte telling how long the common prefix is. In this situation it is difficult to tell, which key will be faster.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Primary key performance int vs. char
7271
July 27, 2005 05:26AM


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.