Your question does not need code tags, since you have posted no code. Based on the fact you marked this question as OT I guess you are not looking for a Perl solution to this? Try SHOW TABLE STATUS LIKE 'table_name' and look at the Data_length and Index_length fields, adding them together should (IIRC) get you the total number of bytes used.