[wp-hackers] postmeta table

Mark Jaquith mark.wordpress at txfx.net
Tue Apr 17 06:17:12 GMT 2007


On Apr 16, 2007, at 8:42 PM, Denis de Bernardy wrote:

> One thing that has tickled me from the very beginning in WP is  
> this: Given
> that the stuff in postmeta is mostly serialized and unqueriable  
> any, why not
> use a postmeta field in the posts table with all of the serialized  
> related
> to the post in it?

(1) You'd have to load everything into memory in order to edit any  
postmeta pairs for a post, which limits scalability.  I have several  
posts with more than 100 postmeta pairs, and one with over 700  
pairs.  That's not normal, but it's nice to know that postmeta is  
flexible enough to handle it.

(2) Only arrays and objects are serialized in postmeta.  String  
values are stored as plain text and are "queryable."  There's no API  
for such, but you can make direct queries.

--
Mark Jaquith
http://markjaquith.com/

Covered Web Services
http://coveredwebservices.com/




More information about the wp-hackers mailing list