I'm working on a website that could eventually have a very large database. The website will be an art community not until deviantART. I'll be running a lot of queries for analyzing how the site is used. I expect some of the queries to kill the database because I don't know how to optimize SQL queries (yet). I'm starting out with a small linux VPS and would move to physical servers in the future.

Which database would scale the best given this situation?


Before you make a decision based on scalability, you might want to read through these two pages and decide how much you value your sanity:

  • 11
    I'm allowed to have sanity? – epochwolf May 1 '09 at 4:17
  • 1
    Excellent post. Don't forget, the larger your database gets, the less you will use it's relation features. If you look at the large social web sites you'll see their use of a relational database is limited to pure key / value storage. – Dave Cheney May 3 '09 at 4:57
  • 1
    Those links are VERY outdated. – Trey May 4 '09 at 4:06
  • 1
    At least in the PostgreSQL document, many items include "this is true for versions N.M and earlier of Product X" qualifiers. Where those are missing, a quick experiment with your installed version followed by an email to the document's author could remedy the situation... – John Siracusa May 4 '09 at 13:57

First let me prefix my answer with the fact that I am heavily biased towards PostgreSQL. I use both PostgreSQL and MySQL very heavily on fairly large site. I, from time to time, have problems with MySQL falling over performance wise. When this happens, I usually restart it and things go back to normal. It's also worth noting that we run PostgreSQL on everything from 8 to 32 core boxes and our MySQL cluster runs on a set of 8 core boxes. Monty, when he was at Sun, stated that MySQL does not scale on a single box beyond 4 cores.


Really it depends on what kind of queries you will be running. Unless you are running very complex queries either will be fine for a very large web site. There are good examples of both databases running very large scale web sites

  • 1
    Very likely true. But besides performance there is also manageability and general ease of use to consider. My personal opinion is that postgres wins hands down in that department. I just can't figure out why everybody else seems to love mysql :p – Jeremy Huiskamp May 4 '09 at 4:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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