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 Anonymous Coward · · Score: 5, Informative

      MS SQL server has its place:

      1: Oftentimes a company already has it licensed, so might as well use it.

      2: It is auditor friendly, with the pieces of paper (FIPS, etc.) that don't mean much in real life, but do mean a lot when ISO, or other audits happen, and you have to justify your existence and design decisions. (For those who say certificates/certifications don't matter, one place I worked actually had auditors that would fire people on the spot for "failing to have authority to run the equipment" if their RHCE/MCSE/CCIE certs lapsed.)

      3: Finding MS SQL expertise is easy.

      4: MS SQL does work and is decently secure. For 99.99% of tasks, it is just as good as Oracle.

      This isn't to say that PostgreSQL is bad... but there are times where MS SQL is the ideal choice.

    2. Re:I choose MS SQL Server by Gr8Apes · · Score: 5, Informative

      I've had the misfortunate to work with 2000, 2005, 2008 and 2008 R2, and 2012, and every single one of them has failed spectacularly, many of them with the same basic issue, that wonderful escalating locks problem, which MS spins as a "performance improvement" much like driving a bus off a cliff improves its performance, and in much the same way.

      --
      The cesspool just got a check and balance.
  2. A more intringuing question... by leonbloy · · Score: 5, Informative
    would be why I still choose to read Slashdot instead of ... anything else.

    Let me quote, from the comments thread at a recent article by same submitter:

    Could we stop having Dice articles submitted by Nerval's Lobster? Why not fully disclose that the story was submitted by the corporate parent of Slashdot?

    Another user, in the same thread, had speculated:

    What comes next, a thread on "is Emacs better than Vi"?

    No, sir, you were utterly wrong. It came "Postgresql is better than 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. In my experience by Trailer+Trash · · Score: 5, Informative

    And I'm probably going to step on a lot of toes here, but people like me strongly prefer Postgres to MySQL. And by "people like me" I mean folks for whom their first real rdbms experience was theoretical or "commercial". I did both.

    I used ingres in college to a small extent and then the Ingres commercial product for years after that. I have also used Sybase and Oracle professionally. PostgreSQL easily walks among the giants of that industry.

    Every time this discussion comes up the MySQL side has to say "yeah, but..." about a thousand times. MySQL doesn't do ______ properly? "Yeah, but if you just install this other piece of software and change a couple of config files it *can* do it.' Well, con-fucking-gratulations!

    The point is that PostgreSQL does exactly what it should do out of the box. I don't have to change a configuration file to make it ACID compliant, fast, correct, whatever. It just works and works correctly out of the box.

    Every time someone tells me how easy MySQL is to set up they've betrayed their experience level in this realm.

    I know a lot of you are going to mod me down - I don't care. But why not reply instead?

  5. Re:I thought we were over the whole SQL thing by Anonymous Coward · · Score: 5, Funny

    I moved all my XML into JSON, then stored it in a MySQL table named "JSONXML" with a single column named "data". I call it "web 3.0 agile database". I'm in the process of writing a manifesto and bunch of books about it.

  6. Re:Postgres has referential integrity by rycamor · · Score: 5, Insightful

    That's not even close to what "referential integrity" means. In fact, it could be used to accomplish quite the opposite.

    OIDs are one feature of PostgreSQL that should be buried inside the implementation and not allowed to be accessed from the developer side. Otherwise you are pretty much completely going around the whole point of the Relational Model. If you are developing an application in such a way that it needs pointers to rows, you might as well just store data on the filesystem and be done with it. Or use one of those fancy NoSQL thingies and enjoy your data corruption.