When considering between PostgreSQL and MySQL bear in mind that client-side drivers are licensed differently. I believe the MySQL connector is still GPL licensed; it used to be LGPL and then the license was changed with little fanfare. Commentators called this "weaponising the GPL". The goal is to get you to buy the enterprise version of MySQL. I know MySQL way better but at a brief look I can see Postgres drivers ar…
Ask HN: PostgreSQL or MySQL?
21–30 of 181 posts
Re: Ask HN: PostgreSQL or MySQL?
#22On the first point, default to using Postgres unless you have a particular reason not to. In general, it offers more and better-executed features. There are some scenarios where MySQL offers a benefit and this advice doesn’t apply, but it’s unlikely you will need to worry about that if you’re in a “what database do I use” position. Your other questions are a bit too vague to be answerable. It’s possible to build anyt…
As someone who has transitioned from MySQL->pg, this makes total sense to me. Partitioning is still a bit better in MySQL IMO (many types / options) - but pg is nearly there.
I've found MySQL replication quite easy to use, whereas PostgreSQL has been rather clunkier in my experience. However, I've had the exact opposite experience with respect to partitioning.
Re: Ask HN: PostgreSQL or MySQL?
#23Re: Ask HN: PostgreSQL or MySQL?
#24EXPLAIN is almost useless on mysql, but very helpful in postgres. EXPLAIN is a very useful command once you have some degree of success (users).
Re: Ask HN: PostgreSQL or MySQL?
#25Did you maybe mean "SQL" and not "SQLite" here?
Re: Ask HN: PostgreSQL or MySQL?
#26#1: depends on your scenario. Postgres is more like Oracle--there are types of query it can do natively that would have to be externally assisted with MySQL. MySQL is simpler, has all kinds of warts, but scales decently. Here's why uber moved to MySQL: https://eng.uber.com/mysql-migration/ #2-4: My use of SQLite has always been very basic, so no idea. Per SQLite's author: " SQLite does not compete with client/server…
Re: Ask HN: PostgreSQL or MySQL?
#27Several years ago, a knowledgable guy told me that the most compelling reason for choosing between PostgreSQL and MySQL was the expected I/O: "for read-intensive workloads (e.g. blogs), choose MySQL; for mixed workloads (e.g. forums), choose PostgreSQL".
But I honestly don't know if that may still be valid as of today.
Nowadays, I think that for basic things, it doesn't really matter; but for peculiar things, Postgres may have some advantages (both technically and not). Also keep in mind that, for some popular scopes, SQLite is likely everything you really need.
Re: Ask HN: PostgreSQL or MySQL?
#28Re: Ask HN: PostgreSQL or MySQL?
#29You don't really benefit from MySQL speed if you are not Facebook, so I would always start with PostgreSQL.
Re: Ask HN: PostgreSQL or MySQL?
#30Regarding 1): choosing a software stack (or any part thereof) without a clear use case is a recipe for failure. What's the use case?
To be fair, often you don't have your requirements completely nailed beforehand, or they change midway through the project. That's why I choose Postgres: aside from extreme scale or latency, you can throw pretty much anything at it. Also, given expert advice, its performance degrades gracefully i.e. lots of easy ways to optimize and workaround issues. Example: pg's type system is insanely flexible incl native support…