Re: Avg_row_length

2003-01-17 Thread Roger Baklund
* Stefan Hinz > * Sergei: > > It's because of NULLs. > > Extra byte is used to mark, if the column is NULL or not. > > Thanks alot for the explanation. Thanks to Gerald Clark, too, who told > me the same. > > > (in fact it's a bitmap, that is it would be one byte for up to 8 > > columns, then it'll

Re: Avg_row_length

2003-01-17 Thread Stefan Hinz
PROTECTED]> To: "Stefan Hinz" <[EMAIL PROTECTED]> Cc: "Sergei Golubchik" <[EMAIL PROTECTED]>; "Keith C. Ivey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 3:48 PM Subject: Re: Avg_row_length > > > Stefa

Re: Avg_row_length

2003-01-17 Thread Sergei Golubchik
Hi! On Jan 16, Stefan Hinz wrote: > Sergei, > > >> any other guru who can explain why 10 = 11? > > > It's because of NULLs. > > Extra byte is used to mark, if the column is NULL or not. > > Thanks alot for the explanation. Thanks to Gerald Clark, too, who told > me the same. > > > (in fact it'

Re: Avg_row_length

2003-01-17 Thread gerald_clark
many) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: "Sergei Golubchik" <[EMAIL PROTECTED]> To: "Stefan Hinz" <[EMAIL PROTECTED]> Cc: "Keith C. Ivey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January

Re: Avg_row_length

2003-01-16 Thread Stefan Hinz
49 30 7970948-3 - Original Message - From: "Sergei Golubchik" <[EMAIL PROTECTED]> To: "Stefan Hinz" <[EMAIL PROTECTED]> Cc: "Keith C. Ivey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 16, 2003 9:16 PM Subject: Re: Avg_

Re: Avg_row_length

2003-01-16 Thread Zak Greant
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 wil

Re: Avg_row_length

2003-01-16 Thread Sergei Golubchik
Hi! On Jan 16, 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? > > Here's the problem once again: > > mysql> DESCRIBE myrowisam; > +---+--+--+-+-+---+ > | Field |

Re: Avg_row_length

2003-01-16 Thread gerald_clark
;Keith C. Ivey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Stefan Hinz" <[EMAIL PROTECTED]> Sent: Thursday, January 16, 2003 5:05 PM Subject: Re: Avg_row_length On 16 Jan 2003, at 0:37, Stefan Hinz wrote: There's a formula to calculate

Re: Avg_row_length

2003-01-16 Thread Stefan Hinz
ct GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: "Keith C. Ivey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Stefan Hinz" <[EMAIL PROTECTED]> Sent: Thursday,

Re: Avg_row_length

2003-01-16 Thread Keith C. Ivey
On 16 Jan 2003, at 0:37, Stefan Hinz wrote: > > There's a formula to calculate the row length for dynamic MyISAM > > tables here: > >http://www.mysql.com/doc/en/Dynamic_format.html > > Thanks for the hint, but this doesn't explain fixed length row > calculations where char(10) will give an av

Re: Avg_row_length

2003-01-15 Thread Stefan Hinz
D]> To: <[EMAIL PROTECTED]> Cc: "Stefan Hinz" <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 4:39 PM Subject: Re: Avg_row_length > On 15 Jan 2003, at 13:03, Stefan Hinz wrote: > > > > I believe there is an extra byte for the 'null' flag; if

Re: Avg_row_length

2003-01-15 Thread Keith C. Ivey
On 15 Jan 2003, at 13:03, Stefan Hinz wrote: > > I believe there is an extra byte for the 'null' flag; if you declare > > this column to be NOT NULL, I'll bet the avg length will be 10. > > nice bet, but you lose : In addition to the bitmap for which columns have null values (if there are any c

Re: Avg_row_length

2003-01-15 Thread Stefan Hinz
<[EMAIL PROTECTED]> To: "Stefan Hinz" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 2:18 PM Subject: Re: Avg_row_length > Yep, you're right! > > Perhaps an extra byte is automatically reserved, not only for a > null/not nu

Re: Avg_row_length

2003-01-15 Thread Steve Edberg
Yep, you're right! Perhaps an extra byte is automatically reserved, not only for a null/not null status bit, but also for other internal use - eg; a 'row changed' bit, etc. I did a quick test: mysql> create table t2 (c1 varchar(255)); Query OK, 0 rows affected (0.00 sec) mysql> insert into t2

Re: Avg_row_length

2003-01-14 Thread Dan Nelson
In the last episode (Jan 14), Stefan Hinz said: > here's my final stupid question for today. Why is the average row > length 11 when it should be 10? > > mysql> DESCRIBE myrowisam; > +---+--+--+-+-+---+ > | Field | Type | Null | Key | Default | Extra | > +--

Re: Avg_row_length

2003-01-14 Thread Steve Edberg
I believe there is an extra byte for the 'null' flag; if you declare this column to be NOT NULL, I'll bet the avg length will be 10. -steve At 10:43 PM +0100 1/14/03, Stefan Hinz wrote: Dear gurus, here's my final stupid question for today. Why is the average row length 11 when it should be 10?

RE: Avg_row_length

2003-01-14 Thread Jennifer Goodie
I am not a guru, but I figured I'd try to answer anyway. It needs an extra bit because it has NULLs. I think it uses the bit to mark if the field is NULL or not, but I've been known to be wrong. http://www.mysql.com/doc/en/Data_size.html - Dear gurus, here's my final stupid question