[wp-hackers] Meta tables: Take 5

Mike Schinkel mikeschinkel at newclarity.net
Wed Aug 5 21:31:57 UTC 2009


On Aug 5, 2009, at 5:23 PM, Joseph Scott wrote:
> On Aug 4, 2009, at 3:20 PM, Peter Westwood wrote:
>> 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.
>
>
> Just wanted to second this.  Please don't use ENUM for this.  I  
> think Otto (or Ozh) already pointed out that using ENUMs would  
> reduce the flexibility of the meta table dramatically by requiring  
> ALTER TABLE just to add a new meta type.
> ALTER TABLE in MySQL on large tables will slow the DB server to a  
> crawl because it will rebuild the entire table.  Seems there was  
> talk of optimizing this case:
>
> 	http://forums.mysql.com/read.php?24,4775,4775
>
> I think the flexibility factor is enough to avoid using ENUM.

Sounds like something that is only needed during a configuration  
change which should be rare and thus not a big issue.  However, I give  
up on that point and won't fight it.

OTOH, I proposed a non ENUM option for those too allergic to ENUM to  
consider it and that is factoring out the string into a linking  
wp_meta table.  Moving forward let's please discuss option #2  
(wp_meta) instead of ignoring it and only talking about why we don't  
like ENUM.

-Mike Schinkel
WordPress Custom Plugins
http://mikeschinkel.com/custom-wordpress-plugins/




More information about the wp-hackers mailing list