Live data from Hacker News

Why Uber Engineering Switched from Postgres to MySQL (2016)

eng.uber.com

41–50 of 133 posts

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#41
post #34
post #33

Earlier quoted context omitted.

I feel that pain! I knew MySQL so well that it felt risky to use a different database, yet if I used it on a non-serious project, how would I get real-world experience? I learned a lot from a book from one of the core contributors to Postgres - https://theartofpostgresql.com/ . It has actual real world examples with realistic datasets to experiment with.

I wish this resource existed (or that I knew it existed if it did) years ago. I always seem to learn about the things that would have made my life easier after I've already done things the hard way.

No pain no gain I guess. Learning things in a difficult way is not a waste of time tbh

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#42
post #7

Earlier quoted context omitted.

Just creating a new user is annoying enough. Permissions are also much more complex. What the hell are schemas?

It would be great if there was some management GUI for these tasks so you don’t have to look up the syntax for these things that in many deployments you only do once.

pgadmin ;-P

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#43
post #20

Earlier quoted context omitted.

Schemas are similar to databases in mysql. They serve as a namespace. In mysql you can have a database `foo` and a table `foo.bar`. In postgres you can have a schema `foo` and a table `foo.bar`. In postgres you can have multiple databases in a cluster, and multiple schemas within each of those databases.

What you are basically saying is that yes, they are much more complex.

No, what you mistake for "complexity" seems to be your general unfamiliarity of what a schema is. In fact, when you understand what schemas are, then it actually makes a lot more sense.

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#44
post #29
post #19

I spent a whole decade saying "Why do I need Postgres? MySQL is fine." Started using Postgres a couple of years ago, and I now can't believe I ever lived without window functions, native arrays, custom types, etc.

I’ve wanted to try post geese but have never really had a chance - everything I do is “prepackaged” and things like Wordpress or Confluence really don’t seem to care if it is MySQL or Postgres.

[deleted]

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#45
post #19

I spent a whole decade saying "Why do I need Postgres? MySQL is fine." Started using Postgres a couple of years ago, and I now can't believe I ever lived without window functions, native arrays, custom types, etc.

My experience as well. I first got the itch when mysql lagged on postgis. Found so many features that have saved me so much time. More sensible defaults, too.

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#46
post #7

Earlier quoted context omitted.

Define: "complicated"

Just creating a new user is annoying enough. Permissions are also much more complex. What the hell are schemas?

Schemas are SQL standard namespaces within a DB. You can join between them. Mysql allows joining across databases, so it doesn't implement schemas.

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#47
post #12
post #9

Earlier quoted context omitted.

Considering the US uses a weird date format, I definitely prefer the former in combination with input sanitation forcing you to thing about your actions before assuming the database will fix it for you.

Agreed. As with strong typing in programming languages, I do prefer a database to be strict in rejecting invalid inputs. MySQL does two bad things here: It accepts an invalid input plus it interprets it creatively, producing something the user most probably didn't intend. In that respect, MySQL is almost as bad as Excel creatively "interpreting" dates. Another example of a database doing improper things would be Orac…

utf8mb3 isn't a broken subset. It includes characters in the basic multilingual plane which is fine for 99% of cases.

uft8mb4 uses more bytes than necessary for most. You get 255 varchar limits with uft8mb3, I think you only get 192 characters with uft8mb4.

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#48
post #19

I spent a whole decade saying "Why do I need Postgres? MySQL is fine." Started using Postgres a couple of years ago, and I now can't believe I ever lived without window functions, native arrays, custom types, etc.

Arrays in Postgres are my guilty pleasure. I know I shouldn’t use them but I just cannot help myself.

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#49
post #7

Earlier quoted context omitted.

Just creating a new user is annoying enough. Permissions are also much more complex. What the hell are schemas?

How is creating a new user complicated? The normal CREATE USER is all I've ever needed to create a new user in postgres (assuming I don't have set up the pg_hba so that I need to allow every user separately)

Does postgres still require a separate user to access the db.

I remember this being a limitation in 2008.

That forced user creation always pushed me to mysql because I hate having separate users for each service because you still have to manage and account for these extra accounts.

Re: Why Uber Engineering Switched from Postgres to MySQL (2016)

#50

Previous discussions: 2016: https://news.ycombinator.com/item?id=12166585 2018: https://news.ycombinator.com/item?id=17280239 Community responses: - https://news.ycombinator.com/item?id=12216680 - https://news.ycombinator.com/item?id=12179222

The response was: https://news.ycombinator.com/item?id=14222721

Even though 99.9% of applications will never run into Uber's issues, it's been 4 years and 4 major versions later, and I'd love to review these complaints and see if they still apply to PG 13.
Post reply on HN