10

I've heard a lot of PostgreSQL but I always wanted to know why you'd choose it over MySQL. What makes it "the world's most advanced" and do those "advanced" features really matter?

Chad Birch
  • 73,098
  • 23
  • 151
  • 149
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
  • As Chad said... duplicate of http://stackoverflow.com/questions/585549/mysql-vs-postgresql-which-should-i-choose-for-my-django-project http://stackoverflow.com/questions/27435/mysql-vs-postgresql-for-web-applications http://stackoverflow.com/questions/110927/do-you-recommend-postgresql-over-mysql – Gishu Mar 20 '09 at 06:19

4 Answers4

11

postgres has better foreign key support, better referential integrity, transactions, views, subselects, etc. But that doesn't mean MySQL doesn't have its place. It really depends on what your needs are. Size of database and complexity of your relations, etc. MySQL is dead simple to set up and use, and it comes by default on virtually all web packages.

You can find Loads of comparisons tween these 2 all over the web.

Scott Evernden
  • 39,136
  • 15
  • 78
  • 84
  • You need to better define "better" in terms of support. How exactly is postgress better, and MySQL worse? ..and I've used the word "better" too many times in this comment already. :) – Nik Reiman Mar 20 '09 at 13:10
  • bobince - FYI, MySQL does not handle subselects well at all. – Mark Richman Feb 23 '10 at 14:35
3

Here's a great comparison page: MySQL vs. PostgreSQL.

This question should probably be considered a duplicate though, the topic has been covered many times here on SO: Google search for "postgresql mysql" on StackOverflow.com

Chad Birch
  • 73,098
  • 23
  • 151
  • 149
2

bobince: RE: foreign key support,referential integrity, transactions, views, subselects: InnoDB may have them, but they are not as standards-compliant, or real world tested than PostgreSQL's (seeing as MySQL devs claimed for years that those features were unneeded). Also, InnoDB is not the default table type and you need to use the non-ACID table type for full text search, amongst other things.

MkV
  • 3,046
  • 22
  • 16
  • 1
    The core functionality of those features is perfectly well real-world tested, and no less standards-compliant than anything else. These are the hand-waving arguments of yesteryear, canards endlessly quoted in furious PostgreSQL/MySQL flame wars, signifying nothing. – bobince Mar 20 '09 at 17:25
  • And a good reason to close this subjective, unresolvable, perpetual question. There are many many other, more extensive web sites - SO isn't going to add any value to the flames. – dkretz Mar 20 '09 at 19:40
0

You should check this:

http://tweakers.net/reviews/649/7/database-test-sun-ultrasparc-t1-vs-amd-opteron-mysql-vs-postgresql.html

This discusses the results with respect to Concurrency and number of cores, Database test: Sun UltraSparc T1 vs. AMD Opteron

"PostgreSQL might be called a textbook example of a good implementation of multithreading"

R K Punjal
  • 1,445
  • 1
  • 15
  • 20