[wp-hackers] Wordpress as a CMS

Otto otto at ottodestruct.com
Mon Dec 21 20:49:10 UTC 2009


Exactly how much metadata are you planning on storing here? Because
the performance of the index isn't related to the number of rows in
the table, it's related to the log of the number of the rows in the
table.

That is, we're indexing on the post-id, not just on the key. Unless
you're storing massive amounts of data on every single post, the
performance would not notably degrade.

Your example shows an unusual case, where you are selecting based on
metadata. However, this is an extremely unlikely case for the vast
majority of cases, where either a specific post is pulled or a series
of posts are pulled based on date, tag, category, etc. You almost
never use metadata to select which posts to display.

If you are using metadata to select posts, then obviously your example
holds, but I'd also say that you're doing it wrong and should be using
custom taxonomies instead. In your example, you use city, type, price.
Presumably every post would have one of these, in which case you
should have three taxonomies for them in order to categorize them into
the right spaces accordingly.

The current downside is that wp_query doesn't offer a way to combine
multiple custom taxonomies, but I'm sure something could be added to
make it work.

-Otto


More information about the wp-hackers mailing list