Re: Re: Because you guys/gals/girls/women/insert pc term here are a smart lot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 07, 2009 at 08:38:03AM +1100, Chris wrote:

> Nathan Rixham wrote:
>> chris smith wrote:
>>>> It may be worth mentioning that, IIRC, CHAR is faster due to the fixed
>>>> length. If you can make your table use a fixed length row size (ie no
>>>> variable length columns), it'll be faster.
>>>
>>> I'd be interested in seeing tests about this.. I doubt there's any
>>> difference.
>>
>> quote: http://dev.mysql.com/doc/refman/5.1/en/data-size.html
>> For MyISAM tables, if you do not have any variable-length columns
>> (VARCHAR, TEXT, or BLOB columns), a fixed-size row format is used. *This
>> is faster but unfortunately may waste some space.* See Section 13.4.3,
>> ?MyISAM Table Storage Formats?. You can hint that you want to have fixed
>> length rows even if you have VARCHAR columns with the CREATE TABLE
>> option ROW_FORMAT=FIXED.
>
> It'd still be interesting to see if it made any noticeable difference
> (I'm guessing not until you get into rather large db's).

FWIW, this is *not* the case with PostgreSQL, according to this note
from the PostgreSQL website:

Tip:  There are no performance differences between these three types,
apart from the increased storage size when using the blank-padded type.
While character(n) has performance advantages in some other database
systems, it has no such advantages in PostgreSQL. In most situations
text or character varying should be used instead. 

http://www.postgresql.org/docs/8.0/interactive/datatype-character.html

Paul
-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux