When you mentioned the number of bytes, is that just the data part of the
table, or the index as well?  You didn't mention if your schema was indexed
one way or another.

Cheers.
-Dana

> -----Original Message-----
> From: Joseph Bueno [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 8:44 AM
> To:   Andrew Kuebler
> Cc:   [EMAIL PROTECTED]
> Subject:      Re: Storage Requirements Not Equal to Actual Disk Space
> Used...
> 
> mysql needs a few more bytes per record for its internal use.
> Since you use a VARCHAR, you have dynamic length records;
> this is described in the manual:
> http://www.mysql.com/doc/en/Dynamic_format.html
> 
> Regards,
> Joseph Bueno
> 
> Andrew Kuebler wrote:
> > I have a table with 17,168,035 records. I have the following column
> > types and I read about the following storage requirements for each
> > column:
> > 
> > (1) INT Column              - Should take up 4 bytes each
> > (1) MEDIUMINT Column        - Should take up 3 bytes each
> > (1) DATE Column             - Should take up 3 bytes each
> > (1) VARCHAR Column  - Should take up Length + 1 bytes each
> > 
> > The INT Column should take up 4 * 17,168,035 = 68,672,140 bytes
> > The MEDIUMINT Column should take up 3 * 17,168,035 = 51,504,105 bytes
> > The DATE Column should take up 3 * 17,168,035 = 51,504,105 bytes
> > I ran a query for the VARCHAR column and it has a total of 141,485,442
> > characters plus the additional 17,168,035 characters to store the string
> > length. I see this column should be taking up 158,653,477 bytes.
> > 
> > Total I would think my table should be somewhere around 330,333,827
> > byes, but rather it is 444,669,952 bytes. To be over 100 meg off, I must
> > be doing something wrong. I did try repairing the table also to make
> > sure I was reading the right file size, but it stays the same. Can
> > anyone tell me what I am doing wrong?
> > 
> > Thank you in advance,
> > 
> > Andrew
> > 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**********************************************************************
             Wal-Mart Stores, Inc. Confidential
**********************************************************************


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to