News for hackers. Stuff that matters.
Re:MySQL Alternatives to MySQL by VMG on Friday March 16, 2012 @09:52AM (#3713284)
asking seriously, are there any downsides to using postgresql?
Re:MySQL Alternatives to MySQL by awj on Friday March 16, 2012 @01:32PM (#3714307)
The out-of-the-box configuration for Postgres has a lot of performance issues compared to MySQL. I'm not really sure what scenario it's designed for, but I've always needed to make changes for my use case.

Postgres' query optimizer is a lot smarter than MySQL's. For trivial queries this is irrelevant, but your queries have to get a lot more complicated before they'll confuse Postgres relative to MySQL.

Postgres doesn't (that I know of) have multiple storage engines. You don't get something like MyISAM where you can trade transactional safety for better read performance. This is both a plus and a minus: you only have one option but all of the storage engine-related developer time has gone into fixing up that one option.

If you're experienced with MySQL, Postgres will probably come off as ... pedantic. Historically it as a project has cared a lot more about data integrity than MySQL has. That means a lot of the things you could "get away with" in MySQL aren't allowed. In general this is a good thing, but it also can get irritating.

In general, Postgres seems to expect you to know/care a lot more about databases. MySQL is set up so that many use cases work well enough without tuning it, but the flipside of that situation is that the average community member probably doesn't know as much about configuring it to get better performance.

If you're looking to treat your database as a big heap that stores your data and more or less efficiently regurgitates it (i.e. 90% of web programming's use of databases) then Postgres is likely going to need too much babying for the value it provides. If you actually need to deal with very complex queries and can afford to care deeply about your data, I'd have a hard time recommending anything else.

Re:MySQL Alternatives to MySQL by lysol on Friday March 16, 2012 @10:13AM (#3713364)
If you're looking to use it with OSS projects there's still a big MySQL bias. If you plan on using it like MySQL, you'll quickly run into casting problems because Postgres is much stricter with types, which is good. Basically, all the downsides are actually upsides.
Re:MySQL Alternatives to MySQL by deweller on Friday March 16, 2012 @10:03AM (#3713325)
Here is one MySQL user's naive response.

Generally speaking, postgresql is not as performant for short queries as MySQL. The MySQL community size is larger than postgresql, although postgres has a substantial community.

Re:MySQL Alternatives to MySQL by arjn on Friday March 16, 2012 @01:36PM (#3714329)
I've been working with postgresql for the last 8 months. I dont really like it though I've gotten used to it now. One thing that sucks in pgsql is the DB-link package. I feel MS SQL Server DBLINKs are way better.

I cut my DB teeth on Oracle and mysql, and have worked with MS SQL server for about 2 years before we moved to postgresql, so I may have a bias but I have to say I'm not terribly impressed with it. One nice thing I found a few months ago was the acquire lock functions in pl/pgsql. This was useful at the time.

Re:MySQL Alternatives to MySQL by mgkimsal on Friday March 16, 2012 @11:06AM (#3713594)
by default, text comparisons are case-sensitive - the opposite of mysql. you'll need to enable some 'citext' extension (or come up with some other workaround).

There's other diffs, but that's one of the ones that jumps out.

Other downsides in what respect? Performance? Compatibility? Portability? Until a few years ago, mysql on windows was better supported, but I think pg on windows has closed that gap a lot (haven't used it on windows anything beyond a basic install, so can't comment too much).

Re:MySQL Alternatives to MySQL by RossM on Friday March 16, 2012 @10:22AM (#3713417)
Something I found while working on my dissertation (that's already known) is that performance is pretty poor for aggregate functions (MAX, MIN, AVG) - wish I'd known that before as I use a lot of them!

On a similarly sized dataset (although I'm yet to test on the same data) MySQL performed a lot better.

Re:MySQL Alternatives to MySQL by xutopia on Friday March 16, 2012 @10:11AM (#3713357)
I have heard of performance differences and memory requirements being lower for MySQL but at the end of the day it doesn't matter much.