Jeff wrote:
Each row in the table takes around 600 bytes, taking every
thing into consideration and assuming every field is used to
its maximum bytes. But the major portion of this 600 bytes
are composed of varchar's (100 + 150 + 50 + 16 + 50 + 20 +
9..) Out of these 400 bytes we generally use only 40 to 50
bytes. Most of them are reserved for future uses. So strictly
speaking even including the space taken by the indexes, the
avg length should not come more than 250 bytes.
If you have a varchar(50) but usually only use 10 in those fields MySQL
still counts the unused 40 for the total byte count of the row, so you
must count them.
An empty varchar(50) field still uses 50 bytes.
No, it doesn't. Storage for a VARCHAR is L + 1, where L is length * bytes
per char. See the manual for details
<http://dev.mysql.com/doc/mysql/en/storage-requirements.html>.
Also, I believe text and blob fields are always counted as 255 bytes
regardless of your settings.
No, it's L + 2.
Ordered indexes are 10bytes per column (in the index) per row. I
believe there is also some paging overhead so generally take your
calculated row size and multiply by 1.1.
Where do you see that in the manual? I'm under the impression that index
size is related to the size of the column being indexed
<http://dev.mysql.com/doc/mysql/en/key-space.html>.
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]