List:General Discussion« Previous MessageNext Message »
From:Zak Greant Date:January 16 2003 8:23pm
Subject:Re: Avg_row_length
View as plain text  
On Thu, Jan 16, 2003 at 06:47:03PM +0100, Stefan Hinz wrote:
> Keith,
> 
> thanks once again! Well, anyone here from the MySQL developer team? Or
> any other guru who can explain why 10 = 11?

  Hi Stefan,

  Here is my guess. ;)

  CHAR columns are fixed width. A CHAR column with a width of 10 will
  always require 10 bytes - regardless of what is put into it.

  If the column also allows NULL values, then the length of all columns 
  becomes 10 bytes + 1 byte for the NULL. 

  Cheers!
-- 
 Zak Greant <zak@stripped> | MySQL Advocate |  http://zak.fooassociates.com

Developing Dynamic Web Applications with MySQL and PHP
  MySQL Training: Nuernburg, June 02-06, 2003
  Visit http://mysql.com/training for more information

"Gosh, Batman. The nobility of the almost-human porpoise."
                                                      --Robin, the Boy Wonder
Thread
Avg_row_lengthStefan Hinz14 Jan
  • RE: Avg_row_lengthJennifer Goodie15 Jan
  • Re: Avg_row_lengthSteve Edberg15 Jan
  • Re: Avg_row_lengthDan Nelson15 Jan
  • Re: Avg_row_lengthStefan Hinz15 Jan
    • Re: Avg_row_lengthSteve Edberg15 Jan
    • Re: Avg_row_lengthKeith C. Ivey15 Jan
      • Re: Avg_row_lengthStefan Hinz16 Jan
        • Re: Avg_row_lengthKeith C. Ivey16 Jan
          • Re: Avg_row_lengthStefan Hinz16 Jan
            • Re: Avg_row_lengthSergei Golubchik16 Jan
            • Re: Avg_row_lengthZak Greant16 Jan
          • Re: Avg_row_lengthgerald_clark16 Jan
          • Re: Avg_row_lengthStefan Hinz16 Jan
            • Re: Avg_row_lengthSergei Golubchik17 Jan
            • Re: Avg_row_lengthRoger Baklund17 Jan
          • Re: Avg_row_lengthgerald_clark17 Jan
          • Re: Avg_row_lengthStefan Hinz17 Jan
  • Re: Avg_row_lengthStefan Hinz15 Jan
  • Re: Avg_row_lengthStefan Hinz15 Jan