[HyperDB] Partitioning wpmu data

Jed Barish jed at deafnation.com
Thu Apr 23 18:56:10 GMT 2009

Is there anyone out there as an expert of HyperDB because I would like to
use hyperdb with our new wpmu site. I knew it will be too complicated for us
to integrate it. It will be easier to hire someone.
Jed Barish
jed at deafnation.com

On Thu, Apr 23, 2009 at 12:49 PM, Andy Skelton <skeltoac at gmail.com> wrote:

> > So, we need to scale somehow. That¹s why he have looked at HyperDB, which
> > seems to have been built just for that.
> Exactly right. WordPress.com, a WordPress MU installation with
> millions of blogs, uses HyperDB. Rather, HyperDB is based on the
> WordPress.com database class. We have additional logic to map blogs
> onto database partitions.
> Inspect get_dataset_from_table. You can add your own logic there or in
> db_connect, or just take advantage of the pattern matching.
> I am reluctant to write documentation for HyperDB because I wouldn't
> advise its use to anyone who wasn't thoroughly familiar with how it
> works. The code isn't the prettiest, but it can be understood.
> How you organize your tables is entirely up to you. WordPress.com blog
> tables were originally mapped to a set of 4096 databases (wpmu_000 -
> wpmu_fff) by taking the first three hex digits of the md5 of the
> blog_id. A million blogs later, we added a column to wp_blogs to store
> the partition that held the blog's tables so that we could move them
> around without losing them.
> That's about all the help I can provide you. Anyone else who is
> familiar with HyperDB may chime in. My usual advice applies: study the
> code.
> Cheers,
> Andy
> _______________________________________________
> HyperDB mailing list
> HyperDB at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/hyperdb

More information about the HyperDB mailing list