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's a bitmap, that is it would be one byte for up to 8 > > columns, then it'll be 2 bytes, etc.) > > If so, this table should have an average row length of 92, not 91, > shouldn't it (9 cols * 10 bytes + 2 bytes)?
No, it shouldn't :) All the columns are NOT NULL, so there's no need for a is_null-bitmap. Extra byte is still necessary, as a 'row is deleted' marker. > MySQL>DESCRIBE myrowisam; > +-------+----------+------+-----+---------+-------+ > | Field | Type | Null | Key | Default | Extra | > +-------+----------+------+-----+---------+-------+ > | col1 | char(10) | | | | | > | col2 | char(10) | | | | | > | col3 | char(10) | | | | | > | col4 | char(10) | | | | | > | col5 | char(10) | | | | | > | col6 | char(10) | | | | | > | col7 | char(10) | | | | | > | col8 | char(10) | | | | | > | col9 | char(10) | | | | | > +-------+----------+------+-----+---------+-------+ > MySQL>SHOW TABLE STATUS LIKE 'myrowisam'; > +-----------+--------+------------+------+----------------+ > | Name | Type | Row_format | Rows | Avg_row_length | > +-----------+--------+------------+------+----------------+ > | myrowisam | MyISAM | Fixed | 1 | 91 | > +-----------+--------+------------+------+----------------+ > > Regards, > -- > Stefan Hinz <[EMAIL PROTECTED]> > Gesch?ftsf?hrer / CEO iConnect GmbH <http://iConnect.de> > Heesestr. 6, 12169 Berlin (Germany) > Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 Regards, Sergei -- MySQL Development Team __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ --------------------------------------------------------------------- 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