Hey, Threadiverse! I’m looking for informed opinions on database choices.

I can stand up an Internet-facing application and have it use either MySQL or PostgreSQL. Which is the better choice, and why do you think so?

Thanks!

  • @[email protected]
    link
    fedilink
    English
    2
    edit-2
    3 months ago

    As somebody who just watched a team implement MySQL for an app that only supported Postgres, I’d go with Postgres.

    I never want to use MySQL again. Postgres or SQLite for relational databases.

    • @[email protected]
      link
      fedilink
      English
      -33 months ago

      Ha! My deepest experience with postgres was watching it fall over and wedge daily when run behind red hat’s satellite (the flailing lame foreman one, not spacewalk).

      Wow, was it ever a dog. Yeah, I get it: the company who shat Systemd on the planet can’t be asked to do much better, but still.

  • @[email protected]
    link
    fedilink
    English
    1
    edit-2
    3 months ago

    The answer is impossible to answer until you tell us more about your needs. Better choice considering what?

    In general, untill you have terabytes of data or a significant amount of traffic (operations per second) database choice does not matter and you should be using cheaper option, where the cost should be assessed as a derivative of price of hosting, cost per operation, cost to deliver (how familiar you are with it).

    When you have significant amount of data or traffic - only then you should worry about database kind or language. Until then this could be a premature optimization.

  • @[email protected]
    link
    fedilink
    English
    13 months ago

    Postgres is a more robust and better designed and developed product, also it’s not owned by fucking Oracle.

  • Max-P
    link
    fedilink
    English
    13 months ago

    As someone that admins hundreds of MySQL at work, I’d go with PostgreSQL.

    • @[email protected]
      link
      fedilink
      English
      13 months ago

      Yeah, every time I find some weird annoying behavior or some missing feature in MySQL, PostgreSQL is doing it right.

      That said, also ask yourself if you really need a relational database, or whether an object store or append-only / timeseries db would fit better.

  • Dark Arc
    link
    fedilink
    English
    13 months ago

    PostgreSQL is just better. It’s supports transactions on DDL (things like altering table structure) and enforces unique constraints after transactions complete … so you can actually do a bunch of important stuff (like update your table structure or swap unique values between rows) safely.