[wp-testers] Possible meta data db change

Dougal Campbell dougal at gunters.org
Fri Nov 17 17:28:43 GMT 2006


Over on the bbDev mailing list, Michael Adams started a conversation
about the implementation of meta data (post meta, user meta, etc). The
current implementation could be improved in a way that would give us
better optimization from the database queries, while (I hope)
maintaining backwards compatibility from the meta data API functions.
Here's the beginning of the thread, for those interested:

  http://comox.textdrive.com/pipermail/bbdev/2006-November/000887.html

If you follow the thread, you'll see that we're considering a change to
the WordPress database schemas to eliminate the meta_id field, and make
post_id+meta_key a unique database index. This, in turn, will require
'smushing' multiple keys into a single key with an array of values.
Which, is exactly how the PHP data structure for meta data is
implemented anyways, so it will just make the DB mirror the in-memory data.

Anyhow, I haven't started working on the actual code changes yet, but I
did start a Trac ticket, in case anybody has any comments (pro or con)
about this idea:

  http://trac.wordpress.org/ticket/3364

The Trac ticket is probably the best place to comment further about
this, rather than cluttering up this mailing list too much.

-- 
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/



More information about the wp-testers mailing list