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 472176
To read all comments associated with this story, please click here.
Member since:

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.

To tell you the truth, that was something I forgot, but
checked it right now an it's using InnoDB

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)

Don't know how well Drupal7 uses PostgreSQL, but it was just an example of something I tried recently to determine how to improve my site speed. Tested it with MySQL, PostgreSQL and SQLite, and the speed compassion was 2:1:1.

Testing other CMSs the ratio varies, but MySQL is always faster.

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.

Well, that's something that most "end users" can't control, since most people gets some software and set it to work without ever looking at the code.
In small databases made by myself I can't feed any speed difference, but I'm positively sure my code is wasting time, but when you use something that "supports PostgreSQL" and there is a noticeable performance difference, it's at least annoying.

I'm not saying it's PostgreSQL's fault, but if that's a known sore spot and something many people use, it should get some attention to try and make it better.

Maybe when I get to test 9.x there will be some improvements.

Reply Parent Score: 2