Linked by Thom Holwerda on Fri 6th May 2011 21:00 UTC
Databases The release of the first beta of version 9.1 of the open source PostgreSQL database has opened a new era in enterprise-class reliability and data integrity that can compete with the big names, say its developers. CIO recently interviewed Josh Berkus, Kevin Grittner, Dimitri Fontaine and Robert Haas about PostgreSQL 9.1 and its future.
Thread beginning with comment 472106
To view parent comment, click here.
To read all comments associated with this story, please click here.
Lennie
Member since:
2007-09-22

Every time I want to use a SQL-database I come back to PostgreSQL, it easily is the most standard compliant, most consistent database of them all.

With PostgreSQL 9.1 it has built in replication, combined with pg_pool II or maybe the new replication features in PostgreSQL 9.2 it does everything 98% of the people would want or need.

Ohh, and it's free and open source. :-)

Some people use MySQL, I tried that, I don't want it anymore. They are now starting to add features again (like memcached compatible protocol support), which is good, competition is good.

Reply Parent Score: 5

GatoLoko Member since:
2005-11-13

Every time I want to use a SQL-database I come back to PostgreSQL, it easily is the most standard compliant, most consistent database of them all.


I've read the same thing a lot of times, but then I try to switch and find PostgreSQL a lot slower.

Try to run a basic Drupal 7 (for example) site with both databases on the same hardware and the speed difference is 2:1 comparing a default MySQL with an "optimized" PostgreSQL. I may have made some mistakes in the optimizations because I'm no expert on Postgre, but it's faster than the default config.

It would be nice to get better defaults, and a simplified "basic optimizations guide" of any kind.

The software may be the best, and the documentation may be good, but it lacks proper "starter/basic guides".

Edited: quoted the wrong section.

Edited 2011-05-07 02:26 UTC

Reply Parent Score: 1

rycamor Member since:
2005-07-18

I've read the same thing a lot of times, but then I try to switch and find PostgreSQL a lot slower.

Try to run a basic Drupal 7 (for example) site with both databases on the same hardware and the speed difference is 2:1 comparing a default MySQL with an "optimized" PostgreSQL. I may have made some mistakes in the optimizations because I'm no expert on Postgre, but it's faster than the default config.


One question: are you using InnoDB or MyISAM tables on the MySQL version? If you are using MyISAM, then the comparison is apples-to-oranges, because ISAM has almost no data consistency checks built into it, so of course it will be faster for basic operations.

Secondly, it is unfortunate that most PHP web software is built around MySQL first with PostgreSQL added as an afterthought. MySQL leads you into some (at times bizarre) design decisions that just don't make sense with PostgreSQL (or most SQL DBMSs)

Also, historically PostgreSQL's big Achilles' Tendon has been the performance of COUNT(), because of how Postgres handles MVCC. If Drupal relies on COUNT() in many places (which wouldn't surprise me), that alone might account for the speed difference. For this reason, developers doing large databases in Postgres tend to use workarounds, such as a trigger which updates a standalone SEQUENCE value. There has been a lot of discussion in the PG dev community about better ways to handle COUNT() (covering indexes, for one), so this might be changing, if it hasn't already been done in 9.1.

Reply Parent Score: 2

pantheraleo Member since:
2007-03-07

I've read the same thing a lot of times, but then I try to switch and find PostgreSQL a lot slower.


Keep in mind that out of the box, PostgreSQL is configured very conservatively, using extremely "safe" defaults. It's possible to greatly improve the performance by tuning it.

Reply Parent Score: 2

JAlexoid Member since:
2009-05-19

MySQL oriented systems end up slower on all other DBMS'es. That will include a optimised for speed Oracle system.
And if you compare InnoDB performance to PostgreSQL performance you'll find that InnoDB falls short. But with unoptimised software, there is no way of getting performance out of it.

Reply Parent Score: 2

unoengborg Member since:
2005-07-06

As long as you do simple things like "select * from table" type of queries MySQL is often faster then Postgresql, but as things get more complicated with a couple of joins, or things like relational division Postgresql often is faster. My guess is that Drupal is designed with that in mind, meaning that you do the heavly lifting in PHP instead of in the database, and thus can't make use of the additional speed Postgresql offer you.

Reply Parent Score: 2