[wp-hackers] Meta tables: Take 5
Peter Westwood
peter.westwood at ftwr.co.uk
Tue Aug 4 21:20:14 UTC 2009
On 27 Jul 2009, at 17:47, Mike Schinkel wrote:
>> Why so large? I was thinking CHAR(20) at most.
>
> Take a look at wp_postmeta and wp_usermeta; meta_key is
> VARCHAR(255). I presumed the same for this.
>
> Even so, ENUM is still a lot more efficient and it provides nice
> "documentation in code" for what types are valid.
>
Please don't use ENUM as it is a mysqlism
We switched away from it [1] to make our DB schema more portable and
to make it easier for people to write alternative database classes.
[1] http://core.trac.wordpress.org/ticket/4778
--
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
More information about the wp-hackers
mailing list