MySQL Forums
Forum List  »  Performance

Re: Is this model correct?
Posted by: Rick James
Date: March 12, 2010 10:02AM

No problem. The space for the index(es) can be larger than for the data.

With InnoDB, the PRIMARY KEY is incorporated into the data, so it registers as very little space. Any secondary keys (you have one) include all the fields of the PRIMARY KEY. So,
KEY "id_indexkey" ("ck_key")
actually contains all the fields of your table. (But it is sorted first on ck_key.)

This implies that the Index_length would be about the same as the Data_length, which it is. Since both data and index are stored in BTrees, there is some variation due to packing and block splits. Hence, one could happen to be bigger or smaller than the other. Yours differ by 2%. I would not be alarmed at a 30% difference (based purely on how BTrees work).

Options: ReplyQuote


Subject
Views
Written By
Posted
3052
March 10, 2010 04:00AM
1344
March 11, 2010 09:04AM
1480
March 12, 2010 04:17AM
Re: Is this model correct?
1424
March 12, 2010 10:02AM


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.