[wp-hackers] 2.4 Feature Proposal: New general meta-data table
Otto
otto at ottodestruct.com
Fri Oct 12 06:37:44 GMT 2007
There's pluses and minuses to both approaches.
Separate tables:
+ Cleaner
+ Easier to simply drop old tables when they're not used anymore
- Extra tables means extra joins and/or extra queries
- Wordpress won't know about these tables internally and can't handle
them itself with things like caching
- Every table is going to be of a different layout and such, more confusion
- Poor plugins will never do things properly, bad indexes and such = slowdown
Combined table:
+ Standardized layout makes it simpler for plugins to manipulate correctly
+ Most plugins just need to store things in the form of key/value pairs anyway
+ Half a dozen things in WordPress itself would be able to use this table
+ Wordpress can handle it with caching and such
+ Less joins, less queries
+ Proper indexing and good design means it'll be quick and fast
- Potential big table full of potential junk
- Manual cleanup is harder (although separating things by the
object_type makes this simpler)
Probably some I left out. On the whole, I'm in favor of a combined
table simply for the reason that the internal bits of WordPress need
it. Why have a postmeta, options, commentsmeta, etc? One table can
handle these better. We're doing weird stuff in WP too, like
attachments as posts and other things that would be better served by
good metadata. A refactoring of these is in order, and if a combined
meta helps push that along, I'm all for it.
More information about the wp-hackers
mailing list