Live data from Hacker News

Anyone made the jump from MySQL to PostreSQL? It is worth it?

old.reddit.com

111–120 of 121 posts

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#111
post #95

Earlier quoted context omitted.

Maybe I've had the misfortune to work at companies that were especially bad at MySQL, or maybe I'm just a Bad Programmer (actually that's probably it), but I've never worked on a project using MySQL that didn't have issues which could have been resolved by switching to Postgres. The first time you need to run a DDL statement on live data (usually: "2.sql"), you'll be thankful for transactions. The places where Postgr…

MySQL has transactions. MyISAM doesn’t, but the apples to apples comparison would be InnoDB, right?

MySQL doesn't have transactions for DDL (i.e. alter table ), which Postgres does. This is very handy for migrations, as you can modify columns and update data in the same transaction and rollback if things go awry.

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#112
Recently did this as MySQL was just not handling large tables as well we needed and their new partitioning and clustering were lackluster for our purposes.

Without even implementing the partitioning and clustering - simply moving to Postgres has "reset" our performance problems on our system. We have tables with 10M+ rows in them that dragged on MySQL (Aurora RDS) - with Postgres (Aurora Postgres) things are running smoothly.

If you are dealing with huge amounts of data but not quite into "BigData" territory - I say go for it.

I just hope you have used an ORM or your queries are generalist enough to make the switch easy - even with an ORM it was a painful migration for us!

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#113

Earlier quoted context omitted.

How is that ironic? Because HN was written in Arc, denigrating PHP is ironic? I don't get it. Edit: Oh, because the article is on the PHP subreddit. To be honest I file PHP developers using MySQL under expected, not ironic.

> I think MySQL smells like poor engineering, and PostgreSQL like good engineering > It’s like Python vs PHP, in some ways. Not just the ordering of the characterization, which would paint PHP in the positive light you clearly think is undeserving. SMH

It seems far more likely that the GP was imprecise in their analogy's ordering, rather than slamming python and praising PHP.

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#114
post #95

Earlier quoted context omitted.

Maybe I've had the misfortune to work at companies that were especially bad at MySQL, or maybe I'm just a Bad Programmer (actually that's probably it), but I've never worked on a project using MySQL that didn't have issues which could have been resolved by switching to Postgres. The first time you need to run a DDL statement on live data (usually: "2.sql"), you'll be thankful for transactions. The places where Postgr…

MySQL has transactions. MyISAM doesn’t, but the apples to apples comparison would be InnoDB, right?

MySQL has lots of features, which don't work in specific cases you will likely encounter some day. This is the case very frequently (and of course this is also the case with transactions). If nothing quite works as you expect, I'd say it falls in the category of a "newb trap". Maybe it would behove us to pick the options that have the lowest amount of those.

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#115

Earlier quoted context omitted.

If YOUR life is good but you want to continue to make your analysts' life a living hell => Don't change anything Otherwise, switch to Postgres. At the very least, for the love of god, make sure your MySQL is >=v8.0

Or you know just export your data to a data lake like redshift spectrum and let the analysts pay for their usage by querying from s3 and take them out of the equation on how you run the website. There is no need for a one size fits all solution here nor a centralized approach.

Exporting the data analysts want to a jurisdiction that has very bad privacy safeguards is unethical. Even if you're not exporting it between jurisdictions, exporting it to a separate company should not be a step that is easy to take for you.

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#116

Isn't that about just switching the db driver in the ORM? Sorry for being sarcastic, but was that not exactly the point of countless database abstraction layer projects?

For a real life metaphor, changing address in order to receive mail is easy; moving to a new house is the complicated and expensive part of the change.

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#117
post #9

If your project is already on MySQL and you have no issue => Don't change anything If your project is already on MySQL and you have issues => understand the issues you are facing and make sure that moving to Postgres would fix them (99% chance it won't) If you have a new project and have very precise informations about the constraint you will face (pretty rare) => Do your research and choose what's best for your use…

Your database is one place where the old rule of "if it ain't broke, don't fix it" should apply.

But, if your database silently changes your data then the database should be considered broken.

Re: Anyone made the jump from MySQL to PostreSQL? It is worth it?

#119

Earlier quoted context omitted.

PostgreSQL underlies at least a plurality of SQL DBMS developments nowadays, specially for scale-out (distributed) projects.

Any sources on that assertion? A quick bit of Google searching [1] shows me only ~10% market share for PostgreSQL, compared to ~46% for MySQL. [1] https://www.datanyze.com/market-share/databases/postgresql-v...

because wordpress
Post reply on HN