[wp-hackers] WPM(U|S) and table partitions

Potkanski, Jason jpotkanski at tribune.com
Tue Apr 6 14:34:15 UTC 2010

There is a multi-db plugin provided by the guys at wpmudev.org. See http://premium.wpmudev.org/project/multi-db . WPMUDEV is a paywall site but the code is GPL.


Jason Potkanski
Tribune Technology

On 4/5/10 6:19 PM, "Elizabeth Buckwalter" <elizabeth at slatetechpdx.com> wrote:

Has anyone explored table partitioning with wordpress?  I've Googled and
searched these archives, but I haven't found a reference.  I've been reading
up on MySQLs table partitioning (
http://dev.mysql.com/doc/refman/5.1/en/partitioning.html) after my husband
says that his company uses it with their Oracle servers.

I understand that for sites like wordpress.com and edublogs, having a
separation of content is really important.  Not to mention that since what
they have works fine, there's no reason to switch.  The site we're
developing for my client is not for users to make blogs but for managing
multiple sites.  So far wordpress mu has worked great.  Unfortunately, I've
been running into various foreach($blog_id) $wpdb->get_results('wp_' .
$blog_id . '_tablename'); issues. And having to create statistic tables just
to be able to do otherwise simple joings.  It seems that with proper
partitions that this would become less of an issue.

I was thinking a basic range partition on blog_id for most tables, with a
subpartition on date (month or year seeing how traffic goes) for comments
and posts.  I have various plugins that would use the blog_id partition as

Categories makes for an interesting design problem.  There exists already,
wp_sitecategories, and the ids are the same ids used in wp_$blog_id_terms.
 I have some ideas, but nothing concrete yet.

More information about the wp-hackers mailing list