PostgreSQL vs. MySQL comparison 390
prostoalex writes "Ever find yourself wondering which open source database is the best tool for the job? Well, wonder no more, and let your tax dollars do the work in the form of Fermi National Accelerator Laboratory publishing this unbiased review of MySQL vs. PostgreSQL. After reading it, however, it seems that MySQL ranks the same or better on most of the accounts." My poor sleepy eyes misread the date of posting on here; caveat that this is more then 15 months old.
No Digg (Score:5, Informative)
2. This article is 2 years old. Everything in its comparisons is out of date.
Old news (Score:5, Informative)
"Last modified: February 15, 2005."
stability (Score:2, Informative)
if you need them and you will make any use of them. If you don't need them or won't use them, then
you're probably better off with MySQL and its superior performance.
PostgreSql is more stable than MySQL, (and has better performance when saturated), shouldn't you take that into consideration?
Old and wrong (Score:5, Informative)
Not similar to my experience (Score:5, Informative)
One comment spammer can completely annihilate it.
One developer I talked to once did some testing. On one simultaneous connection, mysql was way faster. By five or so, they were close. At ten, PostgreSQL was definitely winning. At a hundred, he was simply unable to get a single MySQL server to complete the test successfully, let alone do it quickly.
The impression I get is that PostgreSQL uses more robust algorithms, with higher constant costs and lower quadratic costs. In any event, never had any problems.
As noted elsewhere, these comparisons are quite old...
But in any event, in my own experience, mysql is a lot easier to blow up by overloading than postgres is, at least if you have a lot of writes going on. For pure-lookup functions, it might do better -- but a lot of modern database apps are pretty compulsive about saving at least something every time someone touches them. (For instance, modern vBulletin saves last visits, threads seen, and so on; all of that adds up to a huge load on the database server.)
Re:Foreign Keys (Score:5, Informative)
WTF is with putting up an "unbiased comparison" between Postgres 7.2 and MySQL 5.0 when Postgres is now up to 8.2 and has most of their concerns addressed in that release, whereas MySQL is still at 5.0?
MySQL is a great database, if you need clustering but not referencial integrity or ACID compliance, that is.
There are several problems (Score:5, Informative)
1 -- This article is years old.
2 -- This article is posted solely to stir up (repetitive) discussion.
3 -- This article pretends that MySQL is a real database, even though in order to do so it has to make gigantic leaps like considering data integrity to be not really all that important in a database.
4 -- This article trolled me.
Outdated and Silly (Score:3, Informative)
Re:Foreign Keys (Score:1, Informative)
Re:Foreign Keys (Score:4, Informative)
That'd be because the article was written in 2005. Unbiased? Maybe. Vague, unscientific and out of date? Definitely.
Re: PostgreSQL is easy too (Score:2, Informative)
Re:Foreign Keys (Score:3, Informative)
Is that the same referential integrity and ACID compliance afforded by using INNOdb as your table type in MySQL? ;o)
Crap! (Score:4, Informative)
I call pure, unadulterated crap on this one.
One of the major new features in Postgresql 8 was native Windows support. It runs just fine as a service.
This comparision is either very old news, incompetence in action, or, um! strongly biased.
Re:No Digg (Score:5, Informative)
We run Postgres for our main business application and the main limitations are of two forms:
1) Depth of community
The Postgres community is great - very responsive and knowledgeable, but its size is a limitation in a number of ways. The ODBC driver is a bit of stepchild to the main project, and some key functions like dblink that address missing features like cross-database selects are relegated to
For the same reason a key subset of its documentation is very sparse. Documentation for the core system is thorough, clear and concise, but anything in contrib or any projects like the ODBC or
2) Postgres is very close to being a true enterprise contender (unlike MySQL, which is evolving that direction but distinctly further off), but lacks some key features like XML handling, a more comprehensible approach to result sets (anyone who's dealt with rowtypes and casting resultsets can attest to the steep learning curve), and a userbase that has put the product through the wringer. Now that some corporate heads are getting interested (e.g. Sun, Red Hat, EnterpriseDB) hopefully some of these shortcomings will be addressed in short order.
Don't let this outdated, apples to oranges comparison fool you: Postgres is a very solid and usable database.
Re:Foreign Keys (Score:1, Informative)
Re:Foreign Keys (Score:5, Informative)
The client library is GPL. That means you cannot create a commercial program that uses it without using the commercial licensed version. Which is $200 per client
You can't even create a library and not ship mysql - the mysql site is very clear that they consider distributing a program that *uses* mysql as being exactly the same as distributing mysql itself:
http://www.mysql.com/company/legal/licensing/comm
Typical examples of MySQL distribution include:
* Selling software that requires customers to install MySQL themselves on their own machines.
Specifically:
* If you develop and distribute a commercial application and as part of utilizing your application, the end-user must download a copy of MySQL; for each derivative work, you (or, in some cases, your end-user) need a commercial license for the MySQL server and/or MySQL client libraries.
This makes mysql unusable for anything except large products. Our entire product only cost $70 for the single user version. No way in hell we're upping the price by $200 a copy.
Re:Not similar to my experience (Score:3, Informative)
Obviously you need to tune your environment (there are a plethora of options including table types which can impact things a LOT) to the load, so if you are running into problems at 100 connections, something is wrong.
Re:Foreign Keys (Score:3, Informative)
Ok, here is another outdated test (Score:4, Informative)
And this report is at least professional, which cannot be said about the one mentioned in the article.
http://dcdbappl1.cern.ch:8080/dcdb/archive/ttracz
Re:Not similar to my experience (Score:3, Informative)
Write performance can certainly be an issue, but it depends largely on the application and the table backend. For example, if you can avoid doing deletes on a MyISAM table INSERTs get appended, allowing concurrent reads.
I've not looked at how MT uses the database, but blog software would imply large variable length writes. Definitely not an ideal application for MySQL.
a more up-to-date comparison (Score:3, Informative)
Re:Why we moved from MySQL to PG (Score:5, Informative)
> of our tables nightly through cron.
I've found that just enabling autovacuum seems to keep things in order. And you can tweak it for individual tables [postgresql.org] if you're so inclined.
Here's a recent (Nov. 2006) Performance Review (Score:2, Informative)
Re:Not similar to my experience (Score:3, Informative)
What the hell? If that were true, then what is this? [pgfoundry.org] And this? [unixodbc.org] Not to mention this. [mysql.com]
Are you making a reference to Windows-specific APIs or something? Because I don't understand how you can shout that ODBC doesn't exist for Linux/Unix?
Re:Foreign Keys (Score:3, Informative)
Don't get me wrong, MySQL is far from perfect, but if used properly (like any tool) it can power some very cool stuff.
We always make sure that our apps work on multiple database servers as we realise our clients don't need a one-size-fits-all solution. We used to have to work around MySQL's limitations, but these days that's no longer as big an issue.
Re:No Digg (Score:3, Informative)
Yep, it does. [postgresql.org]
Re:Foreign Keys (Score:1, Informative)
To be honest, my biggest personal "pet peeve"* is on that list as well: "\d" vs. "show tables". And to be fair, this is a problem that arises from SQL being a collection of so many different standards, that aren't (?) accessible as a reference card to the average database application developer. Instead, you end up using the manual for the DBMS you're using as a cheat sheet... and I find MySQL's syntax, where (presumably at least one of the two) varies from the standard, to be far more intuitive. This is a useful "feature", as a developer.
* and by pet peeve, I do not suggest that this is "as important as" things like ACID.. but it is one of the (many) things that keep MySQL in the "good enough for 90% of my projects" category.
Re:Foreign Keys (Score:3, Informative)
Re:Foreign Keys (Score:2, Informative)
MySQL short on features (Score:5, Informative)
Does the Internet's favorite DBMS have an IP address datatype yet?
How about MAC address? CIDR block?
"An IP address is just a 32-bit unsigned int, duh. Any DBMS can store those."
Wrong. A datatype isn't just about storage, but also about operations. In PostgreSQL, when you do a SELECT across a table with IP addresses in it, you get them formatted and displayed as IP addresses, not as opaque ints. Likewise with CIDR blocks, like "192.168.42.0/23". There's also a comparison operator for asking whether an IP address is within a CIDR block.
If you're implementing a network registration system or an incident logging system, how much of your time do you want to waste staring at opaque ints like 3232246272 rather than IP addresses like 192.168.42.0 when you're trying to debug it?
MySQL is a bimbo, a fratboy: it's easy, but so shallow! The amount of time you save in one-time setup, you will lose many times over in all the little annoyances and deficiencies of a DBMS that was originally designed by folks who didn't really believe in DBMSes. Over time they've slowly been shamed into including many of the features they used to despise: transactions, relational integrity checks, and so on. But there's still so much missing ... not just essential integrity features, but little fiddly bits like good datatype support, the kinds of things that make your life easier (as a programmer or as a DBA) in the long run.
Re:Foreign Keys (Score:5, Informative)
I'd like to see... (Score:2, Informative)
http://root.cern.ch/ [root.cern.ch] (large scale repository for data analysis)
And how would you use Postgres for something like that anyway? Maybe something like:
http://www.greenplum.com/ [greenplum.com] (biggy-sized Postgres based data warehousing)
Re:Foreign Keys (Score:3, Informative)
This Was a Hit Piece - Better Data Here... (Score:2, Informative)
Re:Foreign Keys (Score:1, Informative)
Re:Foreign Keys (Score:3, Informative)
Putting some code to handle data integrity is OK but not business logic. Performance isn't everything. I would rather have an application that runs slower and is easier to maintain then the other way around.
"unless the application is written in C. Databases are generally written in C/C++. Applications are generally written in Java,Perl,Python,Ruby. None of these can compete with C."
This is nonsensical. If I write in python the python VM compiles and then runs my code. The VM is written in C. If I write in PL/PSQL then the postgres interprets my PL/PSQL line by line (it never gets compiled). Running your business logic in java should be significantly faster then writing it in PL/PSQL except when the application needs to transfer an ungodly amount of data over the network.
Re:more recent benchmarks (Score:1, Informative)
Linux 2.6.18 vs 2.6.15: http://tweakers.net/reviews/657/2 [tweakers.net]