
PostgreSQL is more popular than MySQL - huntermeyer
http://www.databasefriends.co/2014/03/favorite-relational-database.html
======
67726e
Well, I'm sure on a site _about_ RDBMSes, you're gonna get some skewed
results. In the wild, MySQL sees higher use than PostgreSQL. That said, as an
old coworker would say, MySQL is the PHP of RDBMSes. Ubiquitous, gets the job
done, and works well mostly. Of course it does horrendous comparisons,
conversions, and mutilations of data. Exactly the thing a database should not
do.

~~~
yxhuvud
Usage and popularity is not the same thing though, even if they are all to
often conflated.

I use MySQL and absolutely hate it.

~~~
67726e
When did I conflate the two? For that matter, how do you measure "popularity"
of a piece of software? You could just as well say a piece of software is
popular because everyone knows and loves it or because everyone uses it and
hates it. Webster gives you "liked or enjoyed by many people" and "accepted,
followed, used, or done by many people".

~~~
robbles
I think yxhuvud is agreeing with you, as would I. The original poll is
conflating the two concepts.

------
thehal84
I'll stick with MySQL, the features and stability just keep getting better.
Replication, Memcache Plugin (with amazing write and read performance that
supports replication), InnoDB Barracuda compression, JSON datatypes (in 5.7),
it has scaled amazing well for us at Enginuity Search Engine. I should do a
write up on our company blog sometime about all this.

~~~
davvolun
It's not a deal-breaker per se, but I need someone to explain to me why, at
this point in history, you need to make a choice, at some level, between
relational integrity and full text indexing (InnoDB vs MyISAM)?

~~~
bradleyfalzon
I believe InnoDB does have this now in MySQL 5.6:
[http://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-
index...](http://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html)

~~~
feld
But it's not yet equivalent to Postgres' fulltext

------
ddorian43
I think users of postgresql are usually more experienced, care about features
and complete polls than users of mysql who probably don't user foreign-key
constraints.

~~~
alexchamberlain
Citation please. (I prefer Postgres, but your statement seems harsh.)

~~~
Amezarak
It makes some sense to me. I always find it pretty painful writing anything
but the most simple queries in MySQL - for starters, there's no CTEs, no
windowing functions, and no table-valued functions, all of which I find
invaluable - and the query optimizer (and performance in general) seems... not
so hot.

As far as I can tell, the main reasons people use MySQL are 1) it's well-
known, well-documented, free, and widely available; shared hosting, for
example, is almost always MySQL and 2) replication. I often wonder if the
inadequacies of MySQL are part of the reason for the success of NoSQL
databases and general un-hipness of relational databases.

~~~
cwyers
I used MySQL a lot at my last job (MS SQL Server now, which has its own ups
and downs) and I examined using Postgres for some personal projects, and
there's a few features that I used rather heavily in MySQL (partitioned tables
and upsert are the really big ones) that Postgres doesn't have an out-of-the-
box equivalent to. There's a lot of tradeoffs between the two, I think it's
wrong to say one is better than the other without context.

~~~
nieve
I've used PostgreSQL for 15 years and missed upsert/MERGE for all of them, but
my understanding from previous research is that MySQL's is actually unreliable
in the sense that it can violate ACID in some circumstances. This is
believable to me, MySQL's performance lead on whole table count(*) is because
it doesn't actually count the currently visible rows for large tables.
Complete violation of sql's count semantics, but most people don't know or
care.

I'm digging up some references now.

~~~
nieve
[http://lucumr.pocoo.org/2014/2/16/a-case-for-
upserts/](http://lucumr.pocoo.org/2014/2/16/a-case-for-upserts/) "There is an
obvious question what happens if there are two unique constraints on a table,
and the answer is quite simply that it breaks down in that case. If there are
two uniques MySQL will not give an error but just execute the operation as if
it was happening on the first row that matches. Essentially the where is
extended to be be an or for any of the unique constraints compared to the
values from the insert statement. This is obviously dangerous and definitely
not optional."

------
chishaku
Other data points...

StackOverflow questions

\- MySQL: 279,125

\- PostgreSQL: 32,040

Github repository results

\- MySQL: 16,476

\- PostgreSQL: 4,332

~~~
collyw
The question is what is your favorite. I use MySQL and Postgress. I use MySQL
more, but I would say I prefer Postgress for features,so depends what
definition of popular you are using (by usage, or by users personal favorite).

------
davidw
In preparation for a potential move back to the US, I've started idly browsing
indeed.com for potential jobs.

It's not a dealbreaker, but I have to admit to feeling a tiny bit disappointed
when I see Mysql instead of Postgresql.

~~~
drsintoma
At work we are moving from Postgresql to MySQL, simply because for our current
needs both will do just fine, and as of today, thanks to galera cluster, a
high availability setup in MySQL is much easier to operate.

~~~
davidw
They've both continued to improve, a lot, but whenever I'm forced to use
Mysql, there always seem to be lots of little annoying things that I run into
that make me grumpy.

In any event, I'm positive Mysql is actually more widely used. But Fiats are
more widely used than Ferraris, too.

~~~
drsintoma
Yes, I know your feeling. But sometimes you need to be pragmatic, specially
when resources are limited, and in many use cases you can stick to the
standard ORM functionality and forget about what's underneath.

------
jasondc
This survey (which seems more thorough) has MySQL ahead of Postgres:
[http://db-engines.com/en/ranking](http://db-engines.com/en/ranking)

Ranking methodology: [http://db-engines.com/en/ranking_definition](http://db-
engines.com/en/ranking_definition)

Google trends also shows MySQL above Postgres in popularity:
[http://www.google.com/trends/explore#q=%2Fm%2F05ynw%2C%20mys...](http://www.google.com/trends/explore#q=%2Fm%2F05ynw%2C%20mysql&cmpt=q)

~~~
Someone1234
I legitimately don't understand how Oracle remains so popular.

I mean, I use it at work, but that is because this project dates back to the
late 1980s(!) and decisions were made 20+ years ago.

It doesn't even support a Boolean type(!), costs a ton (over 2x MS SQL, 4x
Postgres), passwords are limited to 30 characters, up until 2007 passwords
were case insensitive, error feedback is "basic," and the syntax is horrific.

Oh and don't get me started on how poorly Oracle maps to programming
languages. number(9,0) and number(18,0) is not an intuitive way to map into
int32 and int64!

Microsoft's bigint, int, smallint for 64, 32, 16 respectively is far more
intuitive.

~~~
CHY872
Mm, my understanding is that it's for a few reasons:

\- Oracle have good name recognition (no one ever fired for using Oracle),
presumably an army of support people, well trained consultants, etc. \-
Postgres traditionally has not been as perforrmant, which makes it less useful
for very large datasets. \- Furthermore Oracle perf can usually be improved
further by hinting properly, which is not possible in Postgres. Certainly
moving like-for-like onto postgres simply led to perf regressions.

I'm not an expert, but those were my main takeaways from talking to people who
are.

~~~
collyw
"Nobody ever got fired for buying Oracle" perhaps?

------
jasode
This is a survey asking " _what 's your favorite?_"

"favorite" != "popular"

I don't think the editorializing in the title is an accurate summary of the
survey's results.

------
Roboprog
In this survey I learned that dBase/Clipper, as well as Access, are relational
databases.

I actually liked working with XBase back in the 80s, but I don't miss not
having foreign key constraints enforced, not having transactions, having long
data values truncated, not being able to take a backup while running.

Early MySQL was too much like XBase for my taste, whereas PostgreSQL felt like
a "real" database. I realize the InnoDB backend makes data integrity a bit
more of a priority, but MySQL always felt like "worse is better", even if a
bunch of "will code HTML for food" 90s internet crack heads helped make it
ubiquitous. Windows is ubiquitous, and that doesn't mean much to me.

------
programminggeek
It might be the db that more people like, but MySQL is more popular by a wide
margin. If only because it runs WordPress which runs like 20% of the internet.

------
carsongross
The ability to spin up and sync a follower db, for eventual cut over... man
I'd kill for that in MySQL.

~~~
vidarh
Replication is an area where MySQL is still _far_ ahead of Postgres. And I say
that as someone who has almost exclusively used Postgres for the last 6 years
or so. Postgres is finally starting to catch up, but it's taken forever.

~~~
jeltz
Not really. PostgreSQL has excellent synchronous replication which can be
controlled per transaction. This is missing in MySQL. What PostgreSQL is
missing is logical replication (both master-slave and master-master. So
depending on your use case either could be ahead of the other.

I am almost 100% certain PostgreSQL will have have stable master-master
replication within 1.5 years. The team working on it has come really far
along.

~~~
vidarh
Lacking master-master is a huge thing. And I still curse at Postgres whenever
I set up replication. There's no good reason why I should have to worry about
wal-archiving, for example.

I'll admit I've never, ever wanted synchronous replication, so that's not a
feature I've cared about.

I agree it will probably get there. But from my point of view it is still
substantially lagging.

~~~
jeltz
You will not have to worry about WAL archiving anymore in 9.4 with the
addition of replication slots.

------
ragecore
This has a lot to do with heroku, I believe.

------
jonifico
How come I'm not surprised? At all.

~~~
blumkvist
Because it's an extremely inaccurate title, based on an extremely biased
survey?

------
nanoscopic
Why are MySQL and MariaDB shown separately. For all intensive purposes they
are the same.

~~~
Someone1234
I might have agreed with that when the two initially forked, however the gap
continues to widen:

[https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-
compatibi...](https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-
compatibility/)

~~~
nanoscopic
So far as liking one versus the other; they are the same. Nobody is going to
say "I like MySQL over MariaDB because I have to change MarioDB options to
make it work the same as MySQL".

