in reply to Perl/PostgreSQL niche

You are right.
For whatever strange reason Postgres hasn't gained the same reputation as MySQL, which makes it a lot harder to "sell" to managers.
It seems everybody's heard of MySQL by now, but few people, even developers, know about Postgres.
I wonder if anybody has an explanation for that...

jayrom

Replies are listed 'Best First'.
Re^2: Perl/PostgreSQL niche
by pg (Canon) on Sep 06, 2005 at 04:37 UTC

    It is always difficult to compare two things, unless one is better than the other in all senses. However MySQL does win two important aspects:

    • Speed. PostgreSQL targets a full set of features, when MySQL aims performance. Performance is extreamly important for database applications. It is easier for you to work around the features, the worst just go the long way, do more coding yourself. There is almost no way to get around performance. You can do things to speed up the application, but evetually it is determined by the database.
    • Security. MySQL grants much finer access control of database components.

      See yesterdays slashdot article about Comparing MySQL and PostgreSQL

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!

        arrrgh ... I hate threads like that.

        but if you kind of speed read it, enough in there to kind of get a few clues out of. I'll be on the lookout for mysql's truncating behaviour - worrying.

      Speed: how many concurrent connections are we talking about here? Given equal hardware, PG supports a greater number of concurrent connections without bogging down; and with the 8.0 release, speed is on-par with MySQL in most areas. Look for speed improvements in 8.1.

      Security:
      "By default, PostgreSQL is probably the most security-aware database available ..."
      Database Hacker's Handbook
      Lithcfield et. al.
      Wiley
      Wiley
        I think your information is outdated. Using the older MyISAM tables, concurrent updates do not scale well on MySQL. The newer InnoDB tables scale very well, and have the same sort of locking system that PostgreSQL has.
      good points. The extra features have to be very very tempting to be more important than speed and security.
      PostgreSQL targets a full set of features, when MySQL aims performance.
      But from what I have read, it aims and misses, at least when you have an application that requires lots of updates, like a big e-commerce site.

      Without PostgreSQL's MVCC "concurrent update" feature, MySQL programs are required to lock the entire table to perform updates. This gets to be the bottleneck for such applications.

      So, while MySQL may be "speedier" on simple tests or mostly-readonly accesses, PostgreSQL is faster (and some say more robust) for real transactions.

      MySQL is structured access to files. PostgreSQL is a real transactional database. Your needs determine which is more appropriate. But please stop trotting out "speed" as a complete determiner.

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.

        But from what I have read, it aims and misses

        You haven't read the entire story, I'm afraid.

        MySQL programs are required to lock the entire table to perform updates.

        That is not correct. Since version 3.23, MySQL has had the capability of locking at record level, using InnoDB tables.

        I am administering an application where a MySQL database handles several thousand of concurrent updates, using transactions and referential integrity, without effort, providing a high level of efficiency.

        A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: Perl/PostgreSQL niche
by danmcb (Monk) on Sep 06, 2005 at 09:53 UTC

    Well, I only started working on sited with a db recently. I jumped into mysql first, because at the beginning you are unsure of what you're getting into, and a large user base, loads of web info, and so on, has a strong attraction from that position. That is perfectly logical.

    Now, after a few months, I see the possibilities of Posgres - but will I be limited enough by mySql to change at some point? Maybe, if I go for a big teardown/rebuild, which may happen. But it won't be for a while.

    For many in my situation, it would be never.