Slashdot Mirror


PostgreSQL vs. MySQL comparison

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.

11 of 390 comments (clear)

  1. No Digg by AKAImBatman · · Score: 5, Informative

    1. There's no such thing as unbiased. Especially on a page that gives a fairly abstract review.

    2. This article is 2 years old. Everything in its comparisons is out of date.

    1. Re:No Digg by electroniceric · · Score: 5, Informative

      Just to continue on your good points, especially troubling is the fact that this article compares the then-unreleased MySQL 5 to the Postgres 7.x series. Nearly all the drawbacks to Postgres that this article highlights have been addressed in the 8.x series.

      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 /contrib, and rely on their individual authors for nearly all maintenance. This means that as a user you are more likely to bump up against the bleeding edge earlier than in communities where these outside-the-core projects are more supported.

      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 .NET drivers are much less like to have the same quality of documentaton. Postgres' extremely powerful GIST indexes are unparalled as a feature, but you need a background in theoretical CompSci to figure them out, thanks to limited documentation (note to aspire database index geeks - I would gladly buy a book on GIST aimed at proficient DBAs who are not giants of theoretical CS). Likewise its procedural languages: thanks to its architecture and open codebase, Postgres offers more server-side languages than any other database that I know of, but few of them have more than basic documentation, let alone the stacks of books you'd find with other procedural languages.

      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.

  2. Old news by daffmeister · · Score: 5, Informative

    From the site:

    "Last modified: February 15, 2005."

  3. Old and wrong by ldapboy · · Score: 5, Informative

    postgresql has a native Win32 version, complete with an installer, service support and does not depend on cygwin.

  4. Not similar to my experience by seebs · · Score: 4, Informative

    I have been involved with a smallish ("hundreds") installation of Movable Type using a mysql backend.

    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.)

    --
    My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
  5. Re:Foreign Keys by ShieldW0lf · · Score: 5, Informative

    This is unbiased? Give me a break.

    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.

    --
    -1 Uncomfortable Truth
  6. There are several problems by kahei · · Score: 4, 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.

    --
    Whence? Hence. Whither? Thither.
  7. Re:Foreign Keys by Tony+Hoyle · · Score: 5, Informative

    Untrue.

    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/comme rcial-license.html

    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.

  8. Re:Why we moved from MySQL to PG by tcopeland · · Score: 4, Informative

    > So, we run a full vacuum and reindex
    > 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 if you're so inclined.

  9. MySQL short on features by Frater+219 · · Score: 4, 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.

  10. Re:Foreign Keys by emurphy42 · · Score: 4, Informative

    It's worth pointing out that the parent is not being sarcastic. You can sell it for whatever price you like - but you still have to make the source available, and you can't place any restrictions on your customers selling copies for whatever price they like. In practice, this tends to drive the cost of GPLed software down to $0.