[wp-hackers] Multiple options vs. one large serialized option

Andy Skelton skeltoac at gmail.com
Fri Aug 8 13:44:07 GMT 2008


On Fri, Aug 8, 2008 at 7:04 AM, Viper007Bond <viper at viper007bond.com> wrote:
> So what's the "cutoff" where it becomes more efficient to break it up than
> store it in one big long serialized string in the database? Or is there one?
> It'd be easier for me to store it all in one option, but I'm not sure what
> would be best from a performance standpoint.

It's a question of scaling. What makes the array grow?

Does the array have a relatively constant size? If the plugin only
stores its configuration, a single options row is ideal for that.

Does the array grow every time a video is added to a post? In that
case, don't put the post-related stuff in options! Use postmeta.

Andy


More information about the wp-hackers mailing list