Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What's the relationship between performance and database size in WordPress? Does a bigger DB mean that my site will be slower? My DB size is currently 360mb.

I also noticed that I have some tables left over from old plugins I have now deleted, do those empty or semi-empty tables influence performance?

share|improve this question
    
This isn't a very realistic question, it's like saying what the relationship between roads and cars, you will need to be much more specific. –  Wyck Jan 17 '13 at 6:41

2 Answers 2

up vote 2 down vote accepted

A bigger database isn't per definition slower, and a smaller database isn't per definition faster.

When a table contains a large amount of information, it could take longer for queries to get their results, depending on the type of query, the amount of data you want to return, the table structure attributes, types and indexes.

You could say, a database that is poorly set up, with less information, could theoretically be slower than a database that is set up good, with more information.

A few tips:

  • Back-up and remove database rows that you definitely won't use anymore.
  • Make sure the right indexes are set, based on the queries you do.
  • Delete old, unused tables, this to clear up some space.

You can say, that in WordPress, if you have like 15000 posts, you can notice it in the performance of your website at some point. For example, when you want to query all the posts for a few with a specific status.

It also depends on what kind of server you have your MySQL on, is it a dedicated server with lots of memory and a killer processor, you won't "feel" the difference as fast than if you have your MySQL server on a old laptop that belonged to your grandma back in the days.

Your question about empty or semi-empty tables that influence performance, I wouldn't sleep a minute less over it. If those tables aren't used in any query, and there aren't much tables the performance difference is neglectable.

share|improve this answer

There is exactly one aspect which for sure will become slower - your backup, for anything else the answer depends on what exactly is bigger in the DB and how your site works.

For unsophisticated sites usually bigger options and posts table will make the site slower as those tables are being queried in almost every page load. But once you get to the point in which you start caring about the sites performance you will probably install a caching plugin to avoid accessing the DB as much as possible and this will make the whole size question mostly irrelevant.

Should you clean your DB if there are unused data in it? sure, but it should be more in order to keep the DB tidy then to gain any measurable performance gains.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.