Problem:
Is there any way of calculating number of bytes occupied by the table creation, i know that you can get some information from information_schema.tables but that information is not accurate enough.
What actually required is the number of bytes according to the definition of the table for innodb only and collation could also be considered as utf-8-general-ci
For example a table test is as following
create table test
(
col1 varchar(25),
col2 int,
col3 varchar(3),
col4 char(15),
col5 datetime
);
Now would require to know the total row size that can be accumulated in one row according to the types of columns in the table.
Found a some sort of similar solution in MSSQL but need its MySQL version
Script to estimate row sizes for any table
Any help is much appreciated.
Best Answer
After much of thinking and researching found one answer which really helped in achieving what was required. It is a perl script and reference link is
http://dev.mysql.com/doc/refman/5.6/en/storage-requirements.html
Thanks all for great help.