[wp-hackers] geocomments?

Owen Winkler ringmaster at midnightcircus.com
Fri Apr 14 14:10:25 GMT 2006

Stewart Ugelow wrote:
> You have to file a trac ticket asking Matt or Ryan for permission to
> buy another cooler, everyone at the party gets to comment about
> whether iced tea is an essential beverage to the party core, and you
> have to write a whole new set of instructions on where the iced tea is
> located and what the process is for grabbing one if you want one. Then
> those instructions have to be maintained and updated every time you
> throw a party going forward.

Like Mark says, you don't need permission to add another table from your 
plugin.  There has been a reasonable amount of chatter (in spite of 
matt's recent "edge case" comment in Trac - this, by the way matt, seems 
much more useful than the dbx server-side storage issue we were talking 
about on #dev) about storing metadata along with comments, which can be 
useful for many applications.

The patch that Mark wrote does a good job of exposing the necessary API 
to access that table data, so creating instructions and detailing the 
process isn't that great of a labor since the functions are nearly 
identical to their post and user meta counterparts.  Plus, they only 
really affect the people who will be using that meta table.

ALSO- The changes he has made make way for better table management in 
code, which is the type of optimization that I would like to see every 
new-feature patch also include.

> The whole process can be a real mess. Just ask the guy who wrote
> http://www.asymptomatic.net/2006/01/17/2216/no-more-feeds-for-wordpress/.

Yeah, I wrote that (Owen == ringmaster == asymptomatic == redalt), and 
I'm not sure how it applies.  I even said that including comment meta is 
a good idea.  I said it would be a lot of work, and Mark has done it, 
and I'm impressed.  Now I just need to test it.  ;)

> But I guess I'm trying to understand is if multiple WHERE clauses
> impede the performance of DB queries to such a degree that people feel
> so strongly about having multiple redundant table structures, why
> aren't WP's DB queries optimized to use one WHERE clause whenever
> possible?

Apart from Mark's valid backward-compatibility sentiment, there is still 
the issue of the size of that table if it contains meta records for all 
the other tables.  Sifting through all of that data on every page 
request for each type of request (post/user/comment/etc) would 
definitely slow things down.


More information about the wp-hackers mailing list