On Wed, 21 Apr 2004, Shu-yu Guo wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I love PostgreSQL as well, and my main gripe with it is speed. I often > run into situations where classes correspond nicely to tables (like a > User class to a users table), so I'm tempted to write code which would > automatically query the database for the neccessary information in its > initialize. However, this gets quite slow because it becomes hard to > combine simple queries into complex ones (which execute much much > faster). I have made optimizations around this, but they're not as nice > to use as just pure data encapsulation. > > This is in no way meant to discourage you from using PostgreSQL, merely > inform you on its biggest limitation I see. It has too many other > merits to be given up (triggers, decent transaction support, so on). > > As a friend has told me again and again, always choose data integrity > over speed. I'm not convinced by the speed argument- I haven't found anything quicker for the data I typically store. In other words: postgresql has always been so fast that I haven't needed to care. Having seen postgres outperform sybase by a _factor_ of 10 when building objects from stored data, it's clear that a lot depends on the resources you dedicate to the database rather than the database software itself (in ideal conditions, I'm sure the race would be much closer). As well as the rich data types and operations supported in postgresql, the big win is PL/ruby which means you can write triggers in ruby. It's great for embedding those tricky bits of business logic and data manipulation in the database itself. Cheers, Mike -- Mike Z <zofa / wyer.org> - it's an apathy thing