Slashdot Mirror


Why I Choose PostgreSQL Over MySQL/MariaDB

Nerval's Lobster writes For the past ten years, developers and tech pros have made a game of comparing MySQL and PostgreSQL, with the latter seen by many as technically superior. Those who support PostgreSQL argue that its standards support and ACID compliance outweighs MySQL's speed. But MySQL remains popular thanks to its inclusion in every Linux Web hosting package, meaning that a mind-boggling number of Web developers have used it. In a new article, developer David Bolton compares MySQL/MariaDB 5.7.6 (released March 9, 2015) with PostgreSQL 9.4.1 and thinks the latter remains superior on several fronts, including subqueries, JSON support, and better licensing and data integrity: "I think MySQL has done a great job of improving itself to keep relevant, but I have to confess to favoring PostgreSQL."

8 of 320 comments (clear)

  1. I choose MS SQL Server by Anonymous Coward · · Score: 5, Interesting

    Best of all worlds. And guess what, in the grand scheme of things, the price is a drop in the bucket compared to salaries.

    1. Re:I choose MS SQL Server by Richard_at_work · · Score: 4, Interesting

      The Express Edition of MS SQL Server is pretty damn good for 99% of the deployments you would consider MySQL for, and its free. The limits are memory usage (1GB per instance), database size (10GB), CPU (1 physical or 4 cores) and instances (50 per server).

      That should run most websites and business apps fine. Because most websites and business apps are drastically overspecced and under used.

    2. Re:I choose MS SQL Server by phantomfive · · Score: 4, Interesting

      I don't know, in my experience, I rank it like this:

      1) Postgresql - full of random features that makes things easier and better (you can use almost any language for stored procedures, for example. Not huge, but nice).
      2) MS SQL - Works fine, not too interesting.
      3) MySQL - full of random feature that makes things harder (do you know you can't rollback a transaction that modifies a table? Every other database can....).
      4) Oracle - Has all the features, but some of them have very funky syntax.

      -- -- -- -- -- --

      If you support using the 'best tool for the job,' then the choice is obvious, following this algorithm:
      1) If you're using a Microsoft stack, use MsSQL (I've tried using entity framework with MySQL....it mostly works, but it's a pain).
      2) If you're using a stack that integrates well with MySQL, use MySQL.
      3) If you are in desperate need of corporate CYA, use Oracle.
      4) For anything else, use Postgresql. You won't regret it.

      --
      "First they came for the slanderers and i said nothing."
    3. Re: I choose MS SQL Server by senatorpjt · · Score: 1, Interesting

      I work on a large data-driven application. At the insistence of a couple of large customers, we have to support MSSQL on the backend in addition to Postgres. MSSQL is the bane of my existence.

    4. Re:I choose MS SQL Server by RoLi · · Score: 3, Interesting

      (un)paid advertizement:

      I love to dump on Microsoft as much as the next guy, but honestly SQL Sever 2000 on is pretty damn good.

      Now, if SQL server is "honestly" so good, why are the one million busiest sites slowly migrating away from Microsoft?

      http://news.netcraft.com/archi...

      In 2008, 20% of the million busiest websites used Microsoft, now only 12% do, and the decline slowly continues.

      When we talk about these installations, we talk about very heavy loads, very much data and very high requirements on reliability and availability.

      So why does the high-end "enterprise" systems move away from that "pretty damn good" platform? The Microsoft apologists on this thread constantly tell me who licensing costs don't matter and how good all Microsoft products are ("honestly"!) - but exactly in the one area where licensing costs really don't matter (the one million busiest sites) Microsoft is also losing it. So why then?

      Maybe it's not as "pretty damn good" as some anonymous internet commentators claim? Honestly?

  2. Duh by Anonymous Coward · · Score: 4, Interesting

    Who trusts MySQL with important data? No one who knows about PG. Good web frameworks like Django prefer PG, while crap ones like Drupal and other PHPtards prefer MySQL.

  3. SQLite3 by fyngyrz · · Score: 5, Interesting

    And for many tasks, you don't need any of that. Have a look at SQLite3 (also, it's built into Python, which can be handy.)

    Worried about stability? You can compile the SQLite3 source code right into your project. That way, your databases always match your shipping product, indefinitely, period.

    It's not usable for everything -- only a decent subset of SQL is supported -- but you might be surprised at just how much is there, and working well.

    --
    I've fallen off your lawn, and I can't get up.
  4. Bottom line by sjames · · Score: 3, Interesting

    In the beginning, Postgress set out with correctness as the primary goal. Whatever it did, it had to do it correctly. It started life on the slow and resource hungry side. MySQL set out to be fast and more or less correct in the common case. Back in the '90s that made a lot of sense for small servers.

    In the decades since, servers have gotten bigger and Postgress got fast and efficient while still being correct. Why would I want to incur a performance penalty in the surrounding software to check behind the database to make sure it didn't just scrag my data?