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.
Permalink for comment 472160
To read all comments associated with this story, please click here.
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