Re: Because you guys/gals/girls/women/insert pc term here are a smart lot
| From: | Ross McKay | Date: | Wed, 07 Jan 2009 13:46:28 +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 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285551@lists.php.net to get a copy of this message | ||
Stuart wrote:
>Got anything to back that up?
>
>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/
Thanks, that'll do nicely. Even that strapped chicken test with tables
that are likely cached shows enum as the fasted, albeit only marginally.
Where disc reads are required, or even (hand-to-forehead) a large table
scan, the difference would be much more significant.
Not that I'd advocate enum columns widely instead of char or varchar (or
text); horses for courses, whatever suits the data best. As I said in
the last post, knowing what your data requires leads to better results
than picking in advance whether to use char or varchar (or text).
Measuring is even better.
--
Ross McKay, Toronto, NSW Australia
"There is more to life than simply increasing its speed." - Gandhi