[wp-hackers] Metadata Mess

Joseph Scott joseph at josephscott.org
Tue Dec 22 21:55:03 UTC 2009


On Tue, Dec 22, 2009 at 1:42 PM, Malaiac <malaiac at gmail.com> wrote:
> See, you are focused on portability and one time performance of an
> ALTER table. I'm focused on long term performance of heavily used meta
> tables. No way I'm gonna suffer a VARCHAR search for each and every
> meta. There are sites with more than 20 000 comments on a single page.
> There are sites with more than 30 meta values per post. ...

That's exactly a case where you don't want to use ENUMs.  Doing an
ALTER table with a large data set is not going to be fast.  What you
are trying gain in a little bit of extra performance is costing your
big time in flexibility.

Adding a new type is not a one time thing, plugins and themes will
bring along their own types as well. I don't think people running
large sites will be too thrilled when activating a plugin takes 20
minutes and takes the rest of the site down with it because MySQL is
busy copying the table because of one ALTER table command.  Now
imagine going throw that for any theme or plugin that wants to add a
new type.

There are lots of ways to make a page faster, and if you are big site
then caching is likely to be part of your future.

-- 
Joseph Scott
joseph at josephscott.org
http://josephscott.org/


More information about the wp-hackers mailing list