MySQL Forums
Forum List  »  Optimizer & Parser

Re: actual Size calculation of mysql table (engine innodb)
Posted by: Rick James
Date: December 12, 2014 08:32PM

SHOW TABLE STATUS LIKE 'tablename';
(Or look in the information_schema database for the same info)
Data_length = bytes for data + PRIMARY KEY
Index_length = bytes for secondary indexes

Be aware that InnoDB has several forms of overhead -- at the record level, block level, etc, so the sizes you see are likely to be 2x-3x the size you would predict by adding the data sizes of the fields (eg, INT is 4 bytes).

If you would like further discussion of the numbers you see, please provide that SHOW, plus SHOW CREATE TABLE tablename;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: actual Size calculation of mysql table (engine innodb)
1174
December 12, 2014 08:32PM


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.