Support » Requests and Feedback » Feature Request: Less MySQL database size

  • Resolved Feriman

    (@feriman)



    Hi,

    My idea:

    Currently in WordPress MU database all user have personal “options” table and it’s in 90-95% contains the same data. What would happen if it’s combine in one table, and only the changes put for each user in apart table?

    So it would be a much smaller database size and processor usage as well.

    I think it’s good idea.

    Ferman, Hungary

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Each site has their own options so each site can customize them. Since there’s no way to predict what sites would have the same data, it’s better to just set them up as their own site, like it’s been done.

    The size is negligible compared to the posts table.

    Every “options” table size is ~300KB.

    If is one million blogs:

    ( 300KB – 30KB ) x 1 000 000 = 257,5GB replicated data.

    30KB of change / blog.

    So, this size ( 257,5GB / one milion blogs ) is negligible?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Compared to wp_post (I have 7megs and up)? Yeah, negligible 🙂

    And that ’30KB’ number you have is only your observed change. Some of my sites have a lot more different, and some don’t. At a million blogs, even more would have more different.

    Keep in mind this is how WordPress.com does it, with a million blogs. Segregation of data is important. More so than the possibility of saving 3000Gigs for a million blogs. At a million blogs, you need a bigger server, multiple DBs, and some caching anyway.

    Okay, I understand.

    But example on my site:

    Currently database size: 1,3GB

    Size with this idea: -945MB, so ~380MB.

    This is not negligible 😉

    ( I’ve ~3500 blogs )

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Look into http://wordpress.org/extend/plugins/hyperdb/

    And at 3500, if your DB is total 1.3GB, you have a lot of unused blogs. Delete them first.

    And then go study what’s IN that table. What isn’t sharable (hint: anything transient has to be per-site)? What can’t be optimized? The list of what is ‘the same’ and the list of what never gets edited aren’t the same thing. Just becuase they’re the same on the sites you compared (and I doubt you matched all of your 3500 sites) that doesn’t mean they’re the same on all.

    The WP_options table needs to be separate per site. At the very least to ensure that data isn’t contaminated and privacy not violated. So yeah, the space you’d save is negligible, and if you’re worried about THAT, you’re not prepared to host 3500 blogs.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Feature Request: Less MySQL database size’ is closed to new replies.