Any experience with tens of thousands of tables in 1 database?

Hey everyone,

I’m looking into using W3 Total Cache on my multi-site installation, but that would mean that I have to give up on database sharding (I’m using HyperDB, but Multi-DB is the same basic idea). I expect my realistic cap on sites is about 4000-5000, with 8000 being the hard cap (I’ll never go above 8000 sites). At ~15-20 tables per site (depending on installed plugins), that means I’m looking at potentially 60,000 to as many as 160,000 tables. MySQL can easily handle that number (I believe the max is in the billions), but I’m not sure what kind of performance issues I might run into (ignoring hardware—I can add lots of RAM if necessary).

Is anyone running a multi-site installation of this size on just one database (or something nearly that size)? How’s it working for you?

I’m also looking into the mysqlnd_ms database extension, that handles sharding or master/slave replication at the driver level, meaning that WordPress never needs to know. Anyone have experience with that extension?


  • leksa
    • WPMU DEV Initiate

    Right now, what i’ve got in our server is one database. Said blogs is around 31k. So you can count its more than 300k tables rightnow in our server. using Nginx, mysql_isam, and clustered the application engine using glusterFS.

    But YES, we have plan to cluster our database soon, next January.

    Our blogs is targeted to local user in Indonesia, use a local content – Indonesia language. We have decision to get the engine running with minimum international bandwith, the fact for fighting the spam.

    So we get more than 20.000 hits/day.

    Its stable in database, maybe it’s helped by the clustered application also. Because you said “ignoring the RAM and hardware capabilty, so this is my answer.. hope its help you.

    *sorry for my english :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.