> 
> It won`t alway give you better performance. But take a table like this:
> (id int unsigned auto_increment,
>  emailadress char(255)
> )
> 
> Suppose the average emailadress is 30 characters. If you have more than a
> trivial amount of entrys you are wasting a lot of space. Space which all
> has to be cached bij your OS. Space you will all have to read from disk if
> you do a like search or cannot use an index or whatever.
> 

Tables with variable length rows can get ugly if not optimized
frequently.  We had one which was taking 2.5 sec to do an indexed query,
and when we optimized the table it dropped to .2 sec.

But as long as you keep your tables optimized, variable length rows can
be faster.  The main efficiency concern, though, is the size of your
indexes.  MySQL keeps your indexes in memory, so smaller indexes are
better.  That is why it is best to use hash values when indexing long
character strings (or even fairly short ones).  A 32-bit hash value of a
20-character field takes 1/5 the space.  That means five times as much
key can be in memory at once.

Hope that makes sense...

Steve Meyers


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