Hi!

-----Original Message-----
From: David Felio <[EMAIL PROTECTED]>
To: Heikki Tuuri <[EMAIL PROTECTED]>
Date: Tuesday, February 12, 2002 12:47 AM
Subject: Re: Static or Dynamic rows -- which is faster?


>On Monday, February 11, 2002, at 12:12  PM, Heikki Tuuri wrote:
>
>> for InnoDB 'dynamic rows', that is, rows where you define char columns as
>> VARCHAR, are faster because tables and indexes fit in smaller space.
>
>Is there reasoning specific to InnoDB? Dynamic tables would be smaller
>regardless of the table type, I would think. In Kaj Arno's talk on
>optimizing MySQL at the O'Reilly Open Source Convention last year, he said
>that fixed tables are preferable and that if you must have dynamic columns,
>  you should try to put them in a table separate from your static columns
>(slides 67 and 68 for those who have them). Has this changed?


I am no expert on MyISAM, but I guess also there it is better to define
VARCHAR(255) rather than CHAR(255), because in big tables disk i/o is often
the bottleneck. I have understood MyISAM searches are faster if the row
format is 'fixed length', but I doubt that this offsets the increased i/o.

http://www.mysql.com/doc/D/y/Dynamic_format.html :
"
You can use OPTIMIZE table or myisamchk to defragment a table. If you have
static data that you access/change a lot in the same table as some VARCHAR
or BLOB columns, it might be a good idea to move the dynamic columns to
other tables just to avoid fragmentation:
"

For InnoDB, VARCHAR is almost always better than CHAR, except in rare cases
where you want to avoid fragmentation caused by updates which change a field
length.

>David Felio
>Software Developer
>Information Network of Arkansas
>http://www.AccessArkansas.org

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com







---------------------------------------------------------------------
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