Re: Because you guys/gals/girls/women/insert pc term here are a smart lot
| From: | chris smith | Date: | Tue, 06 Jan 2009 10:11:56 +0000 |
| Subject: | Re: Because you guys/gals/girls/women/insert pc term here are a smart lot | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285499@lists.php.net to get a copy of this message | ||
> 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.
> Also I could be missing
> something, but I can't see the advantage in VARCHAR since space is not
> really a concern these days.
char is fixed length and padded. If you don't fill up the space, the
db does it for you (even though it seems it's internal only).
http://dev.mysql.com/doc/refman/5.0/en/char.html
When CHAR values are stored, they are right-padded with spaces to the
specified length. When CHAR values are retrieved, trailing spaces are
removed.
--
Postgresql & php tutorials
http://www.designmagick.com/