News for hackers. Stuff that matters.
Re:What PostgreSQL has over other open source SQL databases:... by ebbv on Saturday October 24, 2015 @08:45PM (#10445465)
This article and the previous one are interesting but it's just highlighting features Postgres has that MySQL/MariaDB don't have. I was expecting a "fair" comparison and that's not what these are.
Re:What PostgreSQL has over other open source SQL databases:... by simoncion on Saturday October 24, 2015 @09:36PM (#10445600)
> [The article is] just highlighting features Postgres has that MySQL/MariaDB don't have. [That's not a fair comparison.]

I disagree. If one project has a significant, useful feature that another project does not, it behooves someone who is comparing the projects to mention this fact.

Re:What PostgreSQL has over other open source SQL databases:... by mappu on Saturday October 24, 2015 @10:08PM (#10445665)
Isn't that the GP's point? The article elides the reverse case, features that postgres lacks but MySQL/MariaDB have. "It behooves someone who is comparing the projects to mention this fact."
Re:What PostgreSQL has over other open source SQL databases:... by simoncion on Saturday October 24, 2015 @10:28PM (#10445712)
A few things:

* The article's title is "What PostgreSQL has over other open source SQL databases: Part II". It's PostgreSQL focused, and part 2 in an N-part series.

* When a similar feature appears in MySQL, MariaDB, or Firebird, the author makes mention of it, its limitations, and provides a brief comparison of the implementation differences and/or limitations of that feature across databases.

Given that the usual form of these sorts of article series is to have a one-half or one article feature comparison in the reverse direction, and given that the author takes the time to briefly call out details of other DB's implementations of a given feature -rather than just proclaiming that "POSTGRES IS THE BESTEST!!1!"- I look askance at ebbv's claim that the article is making unfair comparisons.

Re:What PostgreSQL has over other open source SQL databases:... by ebbv on Saturday October 24, 2015 @11:22PM (#10445838)
It depends on what your definition of fair is, that's why I had it in quotes. Clearly you think it's fair to just focus on features you specifically are interested in.

My implication was that I don't think it is. I think you have to highlight the differences between two things and then based on those differences, explain why you think one is best. If all you do is highlight the things you like about one without talking about where it differs from the other, then you're presenting a biased view, IMHO.

Re:What PostgreSQL has over other open source SQL databases:... by spacemanmatt on Sunday October 25, 2015 @05:31AM (#10446454)
If it's a feature comparison and MySQL doesn't even support some features, MySQL is the loser in that case. It's like saying we're going to race, and you don't even have legs. It's not unfair if you show up to the race with streamers on, claiming you're a viable candidate all the way there.
Re:What PostgreSQL has over other open source SQL databases:... by ebbv on Sunday October 25, 2015 @02:45PM (#10447851)
But that's my point. MySQL also has features that Postgres doesn't support. These articles don't bring those up. It seems like you have illustrated my point perfectly; because these articles don't bring up the features MySQL has that Postgres lacks, you think it's a one sided issue.
Re:What PostgreSQL has over other open source SQL databases:... by spacemanmatt on Sunday October 25, 2015 @02:59PM (#10447901)
What features MySQL has that PostgreSQL lacks?
Re:What PostgreSQL has over other open source SQL databases:... by Jweb_Guru on Sunday October 25, 2015 @03:50PM (#10448115)
Not a huge number, as of Postgres 9.5 (which isn't out yet, to be fair, but I think the only thing it adds that MySQL has already is upsert). Easy-to-configure failover is the obvious one. Index-organized tables are another (it doesn't have non-index-organized tables, though :P). It also uses direct I/O instead of going through the OS, so it can be considerably faster for some types of queries in InnoDB (I've seen over 2x better performance for something like raw insert). It also has a pluggable storage engine (though Postgres sorta does too, in the sense of multiple backends, most of its functionality is closely tied to the default one). InnoDB's MVCC implementation is different from Postgres's so it probably has advantages in some situations (though I don't know what those might be). It uses a thread per connection, rather than a process, and doesn't have to allocate the majority of the per-session memory up front, so it can support more connections than Postgres by default (aka without using some third-party tool like pgbouncer to create a connection pool).

There's probably more stuff? However, Postgres has a ton of other features that weren't mentioned in the article... I think the general response from MySQL developers on this topic is that in practice companies don't want all the features Postgres has. I can't comment on the general developer, but I can say that for me virtually all of its features have been useful. And BTW, the list of "stuff MySQL has but not Postgres" used to be a lot longer.

I'd be happy for people more experienced with MySQL to correct me or add anything I was missing. But I think in general the notion that this article is super biased and MySQL has a ton of stuff Postgres doesn't is incorrect.

Re:What PostgreSQL has over other open source SQL databases:... by spacemanmatt on Monday October 26, 2015 @08:03AM (#10450793)
That's a lot of things.

PostgreSQL has had index organized tables (aka clustered indexes) for a long time.

I can't consider a pluggable storage engine a feature. Databases are about little except reliable storage. From memory, the only time pluggable storage drivers affected me is when I realized MyISAM was inadequate and I should have used InnoDB in the first place.

Show me meaningful benchmarks about this 2x performance advantage. Is this raw insert comparable to a local copy with triggers/constraints deferred? Odds are poor that there is such low-hanging fruit the PostgreSQL team simply ignores. My guess is you are unfamiliar with the PostgreSQL-equivalent functionality in this case.

Please don't assert "different so probably better" about MVCC implementations. That's far from rational.

Thread vs process per connection is an artifact of design. More connections don't get you more throughput, rather just consume more RAM. I'm not seeing a feature in this. Real applications pool connections whether in-app or using pgBouncer.

I don't know how you get a "general response" that people don't want "all the features" that PostgreSQL has. I've yet to find an organization using a database that doesn't experience a nearly constant feature demand as they integrate what they have and seek the next level for their operation.

I'm thinking the article is accurate, even if it seems gloating to MySQL fans.

Re:What PostgreSQL has over other open source SQL databases:... by anarazel on Monday October 26, 2015 @09:04AM (#10451095)
> PostgreSQL has had index organized tables (aka clustered indexes) for a long time.

Index ordered and clustered tables are different. Postgres' CLUSTER command simply rebuilds the the index after sorting the underlying data, in a on-off, blocking, operation. That means further operations will slowly reduce the "sortedness" and that it can't be relied upon when correctness is relevant (e.g. to skip a sort step for an ORDER BY).

Real index ordered tables would be nice, but I don't see them in the near future.

> Odds are poor that there is such low-hanging fruit the PostgreSQL team simply ignores.

I'm not aware of any really low-hanging fruits that we know of. While I'd like to improve INSERT performance a bit more, I think at the moment real bottlenecks are elsewhere. I mean on a halfway good single server I can do ~240k INSERTS/sec, without pipelining and about 1100k with. That's not exactly nothing. With COPY instead of INSERTs you can do a lot more.

I think write performance can be a improved a fair bit, but it's not the low hanging fruit level anymore. The biggest things I know are 1) replacing the buffer mapping hash table with a lock free datastructure (radix tree is what I/we are experimenting with) 2) better cache replacement implementation, suitable for very large memory sizes with a high turnover 3) make buffer pins lock free (patch exists) 4) make relation extension scale better

> I'm thinking the article is accurate, even if it seems gloating to MySQL fans.

I wish we could all use a bit less adversarial tone in these kinds of discussions. Mysql does some things better. Postgres some others. For some others it's not yet clear which direction is better. Of course I personally prefer PostgreSQL, but that shouldn't make me blind that they got some things right that we didn't.

EDIT: Updated throughput number from 800k to 1.1 mio.

Re:What PostgreSQL has over other open source SQL databases:... by Jweb_Guru on Monday October 26, 2015 @11:58AM (#10452244)
Just FYI, I don't primarily use MySQL and I'm much more familiar with Postgres. I don't think you read my post charitably (or correctly, in some cases: for instance, I didn't say InnoDB's MVCC implementation was better in general, just that it seemed unlikely that Postgres's is better in all cases). I listed everything I am aware of, feature-wise, that might put MySQL over Postgres for some people. I could write a far longer post in the reverse direction.
Re:What PostgreSQL has over other open source SQL databases:... by dragonwriter on Monday October 26, 2015 @12:39PM (#10452529)
> This article and the previous one are interesting but it's just highlighting features Postgres has that MySQL/MariaDB don't have.

That's exactly what the title says.

> I was expecting a "fair" comparison and that's not what these are.

Assuming by a "'fair' comparison" you mean "an article laying out the relative advantages and disadvantages of Postrgres and other open source databases", how on earth is that even a remotely reasonable expectation of an article titled "What PostgreSQL has over other open source SQL databases".

Its like walking into a clearly-labeled strip club and complaining that you expected fully-clothed, family-friendly entertainment.

Re:What PostgreSQL has over other open source SQL databases:... by chmaynard on Saturday October 24, 2015 @09:39PM (#10445608)
Agreed. The article implies that PostgreSQL has everything the other open-source databases have, plus these additional hot features. If that's true, the author should make it explicit.
Re:What PostgreSQL has over other open source SQL databases:... by simoncion on Saturday October 24, 2015 @10:39PM (#10445737)
> The article implies that...

The world would be a far better place if fewer people would read between the lines of a given statement, and more people would make a habit of carefully parsing statements that others make.

When one writes words for general consumption, it's oh so tiresome to front-load one's writing with a bevy of disclaimers and preemptive clarifications. You will inevitably fail to include one clause or another, causing someone, somewhere to successfully misunderstand your words.

It's better to write exactly what you mean, as clearly as you are able, and -when writing for capable adults- trust that your audience is capable adults who know how to read what has been written and know not to infer meaning in inappropriate places.