Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Baron Schwartz (baronxaprb.com)
Date: Wed Jan 07 2009 - 08:55:57 CST
On Wed, Jan 7, 2009 at 9:17 AM, David Giragosian <dgiragosiangmail.com> wrote:
> On 1/7/09, Jim Lyons <jlyons4435gmail.com> wrote:
>> There are other factors. If a table is completely fixed in size it makes
>> for a faster lookup time since the offset is easier to compute. This is
>> true, at least, for myisam tables. All books on tuning that I have read
>> have said the CHAR makes for more efficient lookup and comparison that
>> Also, I was told by the instructor at a MySQL class that all VARCHAR
>> are converted to CHAR when stored in memory. Can anyone else confirm this?
> That's my recollection, also, derived from a MySQL class. IIRC, the char
> length is equal to the longest varchar record in the column.
Actually it's a fixed-length buffer big enough to hold the worst-case
possible value, not the worst-case existing value. In bytes, no less.
If it's a utf8 varchar(100), that's 300 bytes, even if the biggest
value in the table is one character.
Baron Schwartz, Director of Consulting, Percona Inc.
Our Blog: http://www.mysqlperformanceblog.com/
Our Services: http://www.percona.com/services.html
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql