MySQL Forums
Forum List  »  Perl

Calculate the variable-length key size:
Posted by: AUM A
Date: January 02, 2008 10:03PM

Hi All,

I wish to calculate the variable length key size.Upon some reserach i was able to conclude that to Calculate the variable-length data size: determine how much space is used to store the columns within the row:

The expected row length for dynamic-sized rows is calculated using the following expression:

3 + (number of columns + 7) / 8

+ (number of char columns)

+ (packed size of numeric columns)

+ (length of strings)

+ (number of NULL columns + 7) / 8


Do we have a better and easier way to calculate this as i wish to fetch these variables and do the calculation thru a perl script.

Options: ReplyQuote


Subject
Written By
Posted
Calculate the variable-length key size:
January 02, 2008 10:03PM


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.