in reply to Re: Perl/PostgreSQL niche
in thread Perl/PostgreSQL niche

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:

Replies are listed 'Best First'.
Re^3: Perl/PostgreSQL niche
by ghenry (Vicar) on Sep 06, 2005 at 06:06 UTC

    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.

        If you use MySQL and you did not know about the trucation 'features' of MySQL, then you really should read the MySQL Gotchas page. There are a lot of eye openers in there that would shock users of other DBMSes, but are considered acceptable for developers that have generally only ever used MySQL.

        To be fair, here is the PostgreSQL gotchas page.

Re^3: Perl/PostgreSQL niche
by SpritusMaximus (Sexton) on Sep 06, 2005 at 15:05 UTC
    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.
Re^3: Perl/PostgreSQL niche
by danmcb (Monk) on Sep 06, 2005 at 09:56 UTC
    good points. The extra features have to be very very tempting to be more important than speed and security.
Re^3: Perl/PostgreSQL niche
by merlyn (Sage) on Sep 06, 2005 at 13:02 UTC
    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.