[wp-hackers] HyperDB - worth the trouble?

Brian Layman wp-hackers at thecodecave.com
Thu Mar 8 20:48:24 UTC 2012


On 3/8/2012 2:26 PM, Baki Goxhaj wrote:
>> The good news is in almost all cases WP Multisite already splits sites
>> across tables
> That would be cool then, but is this really the case? Otto? :)
Sure! Every site gets their own set of tables by default.  Posts would 
stored in a table with the blog ID as part of the name.  So you'd have 
things like: wp_2_posts or maybe wp_23_posts

In my opinion, the long and short of it is that you should only move to 
a more complex configuration when you have outgrown your current 
configuration.  Don't anticipate.  Otherwise you are adding complexity 
(and possibly expense) when there is no need.

Only add HyperDB if you know you are being slowed down by the database 
and can't do anything more with caching.   Add extra read servers only 
when you see your current server configuration maxed out and basic 
upgrades to the machine is not going to be cost effective.  Only add 
sharding when adding more machines is no longer cost effective.  Jumping 
ahead of the game and say going straight to a hyperdb configuration 
sharded across regions, because you know your site is going to be 
popular, would add only complexity and distract you from the things you 
need to do to keep your site popular - and it could even slow your site 
down.

Start with memcache and a php accelerator like APC and something like 
w3tc.  Then when needed a separate DB server and then when needed 
hyperdb with a r/w master and a read slave. And read up about php-fpm 
and nginx along the way.

Brian Layman




More information about the wp-hackers mailing list