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:
There are some pretty decent threads on this at stack overflow:
https://stackoverflow.com/questions/110927/do-you-recommend-postgresql-over-mysql
https://stackoverflow.com/questions/216601/postgressql-mysql-oracle-diferences
https://stackoverflow.com/search?q=postgres+mysql
That gotchas site is also great :)
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