4 ms·
As someone who's used MySQL for 17 years and dabbled a little in Mongo is there any reason to try and switch to Postgres? Obviously I love learning new things,
by 12907835202 5y ago
As someone who's used MySQL for 17 years and dabbled a little in Mongo is there any reason to try and switch to Postgres?
Obviously I love learning new things, but I've just never felt inclined to try it out, whereas I'm always jumping between other languages and frameworks within them. Not sure why that is.
- brightball 5y agoHonestly, after using PG for a couple of years it’s more than a little painful to go back. You don’t realize how limited you are until you really get into all the additional capabilities that PG brings…and then have them unavailable.
- nijave 5y agoI think Postgres tends to have a bigger SQL dialect and it's faster on the same hardware (afaik, based on light testing) MySQL clustering and operations tooling seems much better. No vacuums to worry about
- fiddlerwoaroof 5y agoThis former MySQL dev says: > MySQL is a pretty poor database, and you should strongly consider using Postgres instead. https://web.archive.org/web/20220104181634/https://blog.sesse.net/blog/tech/2021-12-05-16-41_leaving_mysql.html https://web.archive.org/web/20220104181634/https://blog.sess...
- mnahkies 5y agoI haven't had a chance to use mysql 8 yet (which I believe narrows the gap between postgres and mysql), but whenever I'm interacting with databases on mysql 5.7 I miss features like common table expressions from postgres
- forinti 5y agoNewer versions of MySQL are better, but it wasn't long ago that it didn't even check column types or constraints. I would not choose MySQL over Postgresql because of this, never mind all the other features.
- stepbeek 5y agoKiller feature for me was transactional schema changes. We use flyway for db migrations which works fine but a failed migration is left in a half completed state in MySQL - Postgres can execute the migration in a transaction that rolls back on failure.
- ezekiel68 5y agoI always get flamed when I mention this (I don't mind it, btw) but... I find it pretty interesting that for the DB write-intensive portion[0] of the TechEmpower web framework benchmarks, you must go further than entry 150 (sorted by most requests-per-second) to find MySQL used, compared to PostgreSQL or Mongo. For the DB read-intensive portion[1], only 15 of the top 100 use MySQL (the rest in that bracket use PostgreSQL), and the first entry there comes in at number 44. Important: if you examine the entries, you'll find that some of the frameworks have multiple listings for different configurations, including the use of MySQL vs PostgreSQL (in other words: same framework, but only the DB is different, in the same test). [0] https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=update https://www.techempower.com/benchmarks/#section=data-r20&hw=... [1] https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=fortune https://www.techempower.com/benchmarks/#section=data-r20&hw=...
- zedfoxus 5y agoIMO there has to be a solid business case to switch a database layer. If MySQL serves your business well, I’d not switch. I like MySQL and PostgreSQL. I’ve used both. I felt the decision to go one way or the other depended more on how the company could maintain it after all decision makers were no longer there. Where MySQL was chosen, getting tooling and support from Oracle or Percona was seen as the biggest benefit. Where PostgreSQL was chosen, quality optimizer and open source was seen as the biggest benefit. I’d highly recommend to try PostgreSQL yourself and learn it’s config, permissions, replication, administration and querying capabilities. You’ll appreciate PostgreSQL’s casting with :: for example. If you had to start from scratch, you’ll be better informed about PostgreSQL and can include it in your selection process. When we used MySQL, we loved the ease of replication and tooling such as Monyog/Webyog/Workbench. When we used PostgreSQL, we loved the query optimizer and JSON functions.