Slashdot Mirror


PostgreSQL Slammed by PHP Creator

leifbk writes "'The Web is broken and it's all your fault' says Rasmus Lerdorf, the creator of PHP. He talks about not trusting user input, and the brokenness of IE, which is all fine. Then he makes a statement about MySQL vs PostgreSQL: 'If you can fit your problem into what MySQL can handle it's very fast,' Lerdorf said. 'You can gain quite a bit of performance.' For the items that MySQL doesn't handle as well as PostgreSQL, Lerdorf noted that some features can be emulated in PHP itself, and you still end up with a net performance boost. Naturally, the PostgreSQL community is rather unimpressed. One of the more amusing replies: 'I wasn't able to find anything the article worth discussing. If you give up A, C, I, and D, of course you get better performance- just like you can get better performance from a wheel-less Yugo if you slide it down a luge track.'"

7 of 527 comments (clear)

  1. Rather incomplete quote by Rasmus · · Score: 5, Informative

    You are basing this on a rather incomplete account of my actual talk. I went through a series of optimizations of a sample Web application, and one of many steps was to try MySQL instead of PostgreSQL for that particular application. By profiling it with Callgrind it was obvious that in this particular case MySQL was significantly faster. I don't think this is news to anybody that MySQL is quicker at connecting and issueing simple queries, and I am not sure why me showing some Callgrind profiles and stating that MySQL is particular good at these things is frontpage slashdot material. Slow day?

    And the "The Web is broken and it is all your fault" thing was just a bit of humour to wake people up for this 9am talk, but I guess it makes for good headlines.

    1. Re:Rather incomplete quote by Rasmus · · Score: 4, Informative

      Sure, the more you can offload to the database, the better. Like I said, my point about emulating things in PHP was directed at MySQL's broken query cache implementation when using the prepare/execute API.

    2. Re:Rather incomplete quote by Rasmus · · Score: 5, Informative

      Once again, I never said it was a good idea to "code around the features of PostgreSQL". I didn't write the article. I gave a talk at a conference. Someone was in the audience taking rather bad notes apparently, and he posted these notes as an article. What I showed was that if your problem fits what MySQL is good at, there are significant performance benefits from using it. It wasn't a PostgreSQL slam in any way. It was a "profile and choose the best and fastest tool for the job" statement.

    3. Re:Rather incomplete quote by Rasmus · · Score: 4, Informative

      It is getting to be rather annoying. A quick email asking me whether the article was an accurate representation of what I actually said would certainly have been more useful, but instead the poster chose to go the other way and focus on the misquoted bits of the article. I have been doing this stuff a long time and have been slammed on /. countless times, but please, slam me for things I actually said or did.

  2. Who cares? use ORM. by profet · · Score: 5, Informative

    I got sick of the syntax dialects of every SQL engine, so I started writing my applications using Hibernate and haven't looked back.

    I learned HQL (Hibernate Query Language) and just use whatever database is handy at the time.

    I usually start with MySQL 5, and then if I need more muscle (Read: the boss wants to spend money), I can switch the entire application to Oracle in about two hours.

    You want ACID...? Use J2EE transactions and Hibernate, and never worry about which database you use again.

  3. Re:There ARE other scriping languages besides PHP by Rasmus · · Score: 5, Informative

    PHP/FI was the second version, and it wasn't written in Perl. Neither was the first version. The first version of PHP replaced some Perl code which may be where this myth comes from.

  4. Re:I love my Yugo luge commute by ajs · · Score: 4, Informative
    Your data is pretty worthless if you can't be bothered with ACID complience to make sure it is consistant.

    For the last 10 years, MySQL data has been atomic across single transactions.

    For the last 5 years, MySQL data has been atomic across transactions.

    For the last 2-3 years, MySQL has supported the full gammut of ACID features.

    Can we PLEASE stop beating this particular dead horse?

    The MySQL 5.0 FAQ

    MySQL still lacks many of the high-level features of databases like Oracle, and for that many of us, the USERS of MySQL are generally greatful.