[wp-hackers] questioning the efficiency of using custom post types
logikal16
logikal16 at gmail.com
Fri Nov 4 20:27:51 UTC 2011
Ah, the age old question of custom tables vs postmeta.
postmeta:
(+) Searchable by default WP search(!)
(+) Uses native WP tables (more future-proof)
(+) Fewer JOINs for queries involving multiple post types
(-) Less efficient storage (separate postmeta row for each field
value, stored as LONGTEXT)
custom tables:
(+) Field types can be enforced by MySQL (INT vs DATETIME)
(+) More efficient storage (instead of all values stored as LONGTEXT)
(+) Faster/fewer queries when querying a single post type
(+) Fewer rows of data per item
(+) Fields can be indexed
(-) Search is NOT automatic. The more custom tables, the more complex
your custom search will become.
For the vast majority of WP sites, the performance difference is
negligible. If you NEED all your content to be searchable, then either
go the postmeta route or prepare to write your own custom search.
If you're using WP to make a custom app (data-heavy, with plenty of
filters), then the custom table approach may be your best bet.
"The K-V version of post meta doesn't scale past a couple hundred
million entries."
If your site had that much data, neither approach would work very
well. At that point, you could try caching, or figure out how to
abstract postmeta to use other DBs (e.g. MongoDB).
Matt
On Nov 3, 11:07 pm, Caio Rogerio Ribeiro <caioroge... at gmail.com>
wrote:
> For article like content i'm scared to use anything but the core tools
> (just plugins to deal with the creation of custom post types)
>
> No one knows how these plugins like pods and others cms plugins will
> grow and can lead to big problems of incompatibility with future
> features for example...
>
> The advantage on my view is to use features not suported by WP like
> homepages (panels in drupal for example)
>
> For who wants a good UI to deal with custom post types, taxonomies and
> fields I recomend more types, more taxonomies and more fields plugins
>
> Enviado via iPhone
>
> Em 03/11/2011, às 22:50, IC IC <icwordpr... at gmail.com> escreveu:
>
> >http://wordpress.org/extend/plugins/pods/
>
> _______________________________________________
> wp-hackers mailing list
> wp-hack... at lists.automattic.comhttp://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list