Stories
Slash Boxes
Comments

News for nerds, stuff that matters

PostgreSQL vs. MySQL comparison

Posted by Hemos on Mon Dec 18, 2006 08:25 AM
from the get-the-morning-starter dept.
prostoalex writes "Ever find yourself wondering which open source database is the best tool for the job? Well, wonder no more, and let your tax dollars do the work in the form of Fermi National Accelerator Laboratory publishing this unbiased review of MySQL vs. PostgreSQL. After reading it, however, it seems that MySQL ranks the same or better on most of the accounts." My poor sleepy eyes misread the date of posting on here; caveat that this is more then 15 months old.

Related Stories

[+] Book Reviews: Pro MySQL 100 comments
Rob Lanphier writes "I'm sure there are plenty of people like myself who do a fair amount of programming against MySQL databases, and consider it a feature of the product that it's pretty easy to do without having to fuss much with the actual database. Still, it's nice to look at what goes on under the hood, even if smoke isn't pouring out from beneath it. Pro MySQL by Michael Kruckenberg and Jay Pipes provides a broad well-organized exploration of intermediate and advanced MySQL topics that is a satisfying overview of the database management system." Read the rest of Rob's review.
[+] IT: PostgreSQL Slammed by PHP Creator 527 comments
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.'"
[+] MySQL Quietly Drops Support For Debian Linux [UPDATED] 339 comments
volts writes "MySQL quietly deprecated support for most Linux distributions on October 16, when its 'MySQL Network' support plan was replaced by 'MySQL Enterprise.' MySQL now supports only two Linux distributions — Red Hat Enterprise Linux and SUSE Linux Enterprise Server. We learned of this when MySQL declined to sell us support for some new Debian-based servers. Our sales rep 'found out from engineering that the current Enterprise offering is no longer supported on Debian OS.' We were told that 'Generic Linux' in MySQL's list of supported platforms means 'generic versions of the implementations listed above'; not support for Linux in general." Update: 12/13 20:52 GMT by J : MySQL AB's Director of Architecture (and former Slash programmer) Brian Aker corrects an apparent miscommunication in a blog post: "we are just starting to roll out [Enterprise] binaries... We don't build binaries for Debian in part because the Debian community does a good job themselves... If you call MySQL and you have support we support you if you are running Debian (the same with Suse, RHEL, Fedora, Ubuntu and others)... someone in Sales was left with the wrong information"
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • From TFA:

    Having foreign keys [...] can all be very attractive in PostgreSql—if you need them and you will make any use of them.

    Foreign keys are nice, I have to say; I implement them in mysql anyway, in spite of the fact that they're ignored for MyISAM.

    • Re:Foreign Keys (Score:5, Insightful)

      by mwanaheri (933794) on Monday December 18 2006, @08:34AM (#17284976)
      Foreign keys are more than nice, they are essential. Unless, maybe you don't care about the integrity of your data or want to make the necessary checks in their application. The latter should keep their eyes down and their mouth shut if the talk is about 'speed' of any rdbms, off course.
      [ Parent ]
      • Re:Foreign Keys by Tony Hoyle (Score:2) Monday December 18 2006, @08:59AM
        • Re:Foreign Keys by Sparr0 (Score:1) Monday December 18 2006, @09:05AM
          • Re:Foreign Keys (Score:5, Informative)

            by Tony Hoyle (11698) <tmh@nodomain.org> on Monday December 18 2006, @09:24AM (#17285470)
            (http://www.nodomain.org/)
            Untrue.

            The client library is GPL. That means you cannot create a commercial program that uses it without using the commercial licensed version. Which is $200 per client

            You can't even create a library and not ship mysql - the mysql site is very clear that they consider distributing a program that *uses* mysql as being exactly the same as distributing mysql itself:

            http://www.mysql.com/company/legal/licensing/comme rcial-license.html [mysql.com]

            Typical examples of MySQL distribution include: ...
                    * Selling software that requires customers to install MySQL themselves on their own machines.

            Specifically:

                    * If you develop and distribute a commercial application and as part of utilizing your application, the end-user must download a copy of MySQL; for each derivative work, you (or, in some cases, your end-user) need a commercial license for the MySQL server and/or MySQL client libraries.

            This makes mysql unusable for anything except large products. Our entire product only cost $70 for the single user version. No way in hell we're upping the price by $200 a copy.

            [ Parent ]
            • Re:Foreign Keys (Score:4, Insightful)

              by Smidge204 (605297) on Monday December 18 2006, @10:02AM (#17285978)
              I wans't aware that "commercial application" and "GPL licensed" were mutually exclusive. From the page you linked:

              The Commercial License is an agreement with MySQL AB for organizations that do not want to release their application source code. Commercially licensed customers get a commercially supported product with assurances from MySQL. Commercially licensed users are also free from the requirement of making their own application open source.

              When your application is not licensed under either the GPL-compatible Free Software License as defined by the Free Software Foundation or approved by OSI, and you intend to or you may distribute MySQL software, you must first obtain a commercial license to the MySQL product.


              Emphasis mine. In other words, You don't have to pay the $200 if your project is itself compliant with the GPL or similar license scheme.

              "Comply with the GPL or pay us $200 to legally use our code or libraries" is not the same as saying "You have to pay us $200 if you plan to sell software you made using our code or libraries."
              =Smidge=
              [ Parent ]
              • Re:Foreign Keys by bberens (Score:1) Monday December 18 2006, @10:53AM
              • Re:Foreign Keys (Score:4, Interesting)

                by anothy (83176) on Monday December 18 2006, @11:36AM (#17287434)
                (http://anothy.9srv.net/)
                good clarification. but still: does this really hold water? i mean, unless they're using a modified GPL or whatever (is the GPL open-source?), they don't really get to dictate the terms. "derivative work", for example, isn't something they get to define. if i'm shipping a closed-source app that simply requires MySQL be also installed, and not something that's statically linked to their binaries, where's the "derivative work" come in?
                [ Parent ]
              • Re:Foreign Keys by dubious9 (Score:2) Monday December 18 2006, @12:22PM
              • Re:Foreign Keys by sobachatina (Score:1) Monday December 18 2006, @02:20PM
              • Re:Foreign Keys by meiao (Score:1) Tuesday December 19 2006, @10:03AM
              • Re:Foreign Keys by Crizp (Score:3) Monday December 18 2006, @11:02AM
              • Re:Foreign Keys (Score:5, Informative)

                by emurphy42 (631808) on Monday December 18 2006, @11:13AM (#17287004)
                (http://zenith.homelinux.net/)
                It's worth pointing out that the parent is not being sarcastic. You can sell it for whatever price you like - but you still have to make the source available, and you can't place any restrictions on your customers selling copies for whatever price they like. In practice, this tends to drive the cost of GPLed software down to $0.
                [ Parent ]
              • Re:Foreign Keys by anothy (Score:3) Monday December 18 2006, @11:21AM
              • Re:Foreign Keys by dubious9 (Score:3) Monday December 18 2006, @12:11PM
              • Re:Foreign Keys by raju1kabir (Score:2) Monday December 18 2006, @12:45PM
              • Re:Foreign Keys by cortana (Score:2) Monday December 18 2006, @01:49PM
              • Re:Foreign Keys by JFitzsimmons (Score:2) Monday December 18 2006, @02:24PM
              • Re:Foreign Keys by lord_rob the only on (Score:2) Monday December 18 2006, @02:53PM
              • Re:Foreign Keys by Haeleth (Score:3) Monday December 18 2006, @02:59PM
              • Re:Foreign Keys by Talchas (Score:1) Monday December 18 2006, @03:40PM
              • Re:Foreign Keys by Crayon Kid (Score:2) Monday December 18 2006, @03:41PM
              • Re:Foreign Keys by Crayon Kid (Score:2) Monday December 18 2006, @03:44PM
              • Re:Foreign Keys by cyberon22 (Score:3) Monday December 18 2006, @04:09PM
              • Re:Foreign Keys by MarkLewis (Score:1) Monday December 18 2006, @04:59PM
              • Re:Foreign Keys by dubious9 (Score:2) Monday December 18 2006, @06:18PM
              • Re:Foreign Keys by gumbi west (Score:2) Monday December 18 2006, @07:40PM
              • Re:Foreign Keys by anothy (Score:2) Monday December 18 2006, @07:47PM
              • Re:Foreign Keys by statusbar (Score:2) Monday December 18 2006, @11:04PM
              • Re:Foreign Keys by innocent_white_lamb (Score:1) Tuesday December 19 2006, @12:23AM
              • Re:Foreign Keys by maop (Score:1) Tuesday December 19 2006, @04:35AM
              • Derivative or not by maop (Score:1) Tuesday December 19 2006, @04:55AM
              • Re:Foreign Keys by MarkLewis (Score:1) Tuesday December 19 2006, @11:23PM
              • Re:Foreign Keys by adah (Score:1) Wednesday December 20 2006, @08:55AM
              • Re:Foreign Keys by anothy (Score:2) Wednesday December 20 2006, @04:15PM
              • 1 reply beneath your current threshold.
            • Re:Foreign Keys by maxume (Score:1) Monday December 18 2006, @10:14AM
            • Re:Foreign Keys by raynet (Score:2) Monday December 18 2006, @12:06PM
            • 1 reply beneath your current threshold.
        • Re:Foreign Keys by mwanaheri (Score:3) Monday December 18 2006, @09:16AM
          • Re:Foreign Keys by Tony Hoyle (Score:3) Monday December 18 2006, @09:29AM
            • Re:Foreign Keys (Score:5, Insightful)

              by vadim_t (324782) on Monday December 18 2006, @10:10AM (#17286088)
              (http://sheelab.homecreatures.com/)
              Well, I sure hope you never work on anything serious.

              The database's function is to provide a RELIABLE storage for your data. Part of the whole reliability thing is making sure crap can't get in, because once it's there everything goes to heck.

              For instance, let's take a shopping cart. Can an order be for a negative quantity? If your app doesn't work that way (it could, using a negative amount for returns for example), and you still allow it in the DB, then all your reporting goes to heck, as SELECT SUM... now returns the wrong thing.

              A proper database is set up in such a way that every piece of data in it makese sense. This means for instance not having things like orders hanging around without in the void without being linked to some client. This is something easily ensured by foreign keys. Otherwise you have an utter mess - the total of the orders in the database doesn't match the sum of the orders of all clients!

              If you put your checks in the database, you have a guarantee that when somebody else codes another frontend to it (say, you had a website and now are making a special version for PDAs), if the application does the wrong thing, the database simply won't let it happen. This may cost a bit of speed, but I assure you that peace, your sanity and your ASS (if you have a boss and he's got any sense, he's not going to like it at ALL if it turns out that reports don't match reality, and that reality can't be even easily extracted) is far, far more valuable.
              [ Parent ]
              • Re:Foreign Keys - Aw HELL by thedave (Score:1) Monday December 18 2006, @12:30PM
              • Re:Foreign Keys by partenon (Score:1) Monday December 18 2006, @12:58PM
              • Re:Foreign Keys (Score:4, Insightful)

                by vadim_t (324782) on Monday December 18 2006, @01:30PM (#17289432)
                (http://sheelab.homecreatures.com/)

                That's the reason OOP is there :-) Database abstraction, DAO's and Model's (POxO/DTO/whatever) can be responsible for storing/validating data and reused in other app's (as webservices, libraries, ...)


                None of this applies when somebody logs in with psql/enterprise manager/whatever and updates something in the database by hand. You can have all the OO and libraries you want, but it doesn't help if the new application doesn't use it. Yesterday we had code in VB6, today we have it in C#. Application is completely different. Guaranteeing that all the VB code will be exactly translated to C# is very, very hard.

                On the other hand, the database remains being the same, and all the constraints it has don't care about which language, methodology or whatever is being used. VB, C#, Perl, PHP, are all automatically held to the same constraints.


                  You can have N account types (customer, broker, corporate, ...) Each account type have it's own set of "valid data" constraints. And even inside the same "account type", the validation can change (if an account was opened before date XX, it's permitted to do bla). You just can't do that using simple foreign keys. And if you want to ensure your data is consistent, you *will* need Stored Procedures and Triggers.


                And what's the problem with that? Use stored procedures and triggers then. Seriously, in a database of any size, forget about any attempts at compatibility with other databases. It only works on very, very trivial applications.

                Just take postgres and mysql. PostgreSQL loves big transactions. The overhead for a transaction is high, but it's perfectly happy with large, long running transactions, and the more the better. PostgreSQL will be slow if you have a transaction per statement.

                On the other hand, databases like mySQL want tiny transactions because the locks are really problematic. Leave a transaction uncommitted, and quickly things will grind to a halt. On the other hand, on postgresql the worst problem will be the lack of vacuum, which will gradually slow things down, but doesn't cause immediate problems.

                If you make it for mySQL, without a redesign it'll suck on postgres and viceversa. If you try to make it for both, it'll be suboptimal on both.

                [ Parent ]
              • Re:Foreign Keys by vadim_t (Score:2) Monday December 18 2006, @02:38PM
              • Re:Foreign Keys by vadim_t (Score:3) Monday December 18 2006, @02:47PM
              • Re:Foreign Keys by killjoe (Score:2) Monday December 18 2006, @03:20PM
                • Re:Foreign Keys by Serveert (Score:2) Tuesday December 19 2006, @12:46AM
                • 1 reply beneath your current threshold.
              • Re:Foreign Keys by electroniceric (Score:2) Monday December 18 2006, @03:47PM
              • 2 replies beneath your current threshold.
            • Re:Foreign Keys by Calinous (Score:1) Monday December 18 2006, @11:10AM
              • Re:Foreign Keys by ShieldW0lf (Score:3) Monday December 18 2006, @01:28PM
              • Re:Foreign Keys by ShieldW0lf (Score:2) Monday December 18 2006, @01:44PM
              • 1 reply beneath your current threshold.
            • by alienmole (15522) on Monday December 18 2006, @01:29PM (#17289414)
              I suspect you're thinking of relatively simple cases where you have a single application working against a database. Which of course is the standard MySQL scenario.

              Where foreign keys and the other referential integrity features really shine is in true enterprise scenarios, when you may have hundreds or thousands of applications, written in multiple languages, working against the same shared database(s).

              In that scenario, the only viable way to duplicate the functionality of foreign keys at the application level is to have a middle layer which all other applications are required to go through. Realistically, that middle layer has to be implemented as a server, serving requests for object/record creation, update and delete over the network. Implementing it as a library to be linked into applications doesn't work well, because there are multiple applications accessing the database, and integrity enforcement needs to be centrally coordinated.

              Implementing a middleware data server for an application isn't all that difficult, but integrating it into applications can be. Most application development environments know how to talk to databases, but don't automatically know how to talk to your application-specific, language-independent, data server. So now you're writing a client library for each app dev platform used in the enterprise, and dealing with things like integrating your custom interface with data-bound controls in the user interface. BTW, this is where people start resorting to e.g. SOAP, and projects start going off the rails (no pun intended, Ruby fans).

              Luckily, as it turns out, there are already standardized, widely-available, well-supported systems that implement a centralized data serving service which enforces referential integrity. They're called databases. And foreign keys are an essential part of the service they provide.
              [ Parent ]
            • Re:Foreign Keys by counterplex (Score:1) Monday December 18 2006, @05:31PM
        • Re:Foreign Keys (Score:5, Insightful)

          by Branko (806086) on Monday December 18 2006, @09:45AM (#17285760)
          Your app should be checking itself anyway.

          Actually it shouldn't (in this context). Typically, one database will have several client applications attached to it. If data consistency is not checked at DB level, then:

          • Bug in single application might compromise the data consistency of the whole system.
          • You must keep all of your applications precisely synchronized.
          • You are repeating the job of implementing the same consistency logic across all applications instead of implementing it only once - in database.
          • Implementing these sorts of checks can be difficult to do correctly at the application level in a concurrent environment typical for a DBMS.
          • Data consistency at DB level is directly supported by modeling tools, so you can plan for it and visualize it early enough to spot problems and communicate it to the other team members more easily.
          [ Parent ]
          • Re:Foreign Keys by Bilbo (Score:2) Monday December 18 2006, @11:24AM
          • Re:Foreign Keys (Score:5, Insightful)

            by tacocat (527354) <tallison1@ t w m i . r r.com> on Monday December 18 2006, @12:58PM (#17288880)

            Additionally, databases generally can do this faster than the application code. I can say this because databases are written in C and optimized and debugged for years. Applications are rarely (relatively) written in C and have not been debugged for years when released.

            This is something that actually really pisses me off about Ruby, Rails, and ActiveRecord. ActiveRecord is an insane violation of everything that a database has been built to do. It breaks consistency, violates keys, ignores so many rules... And it's beats the crap out of a database to do what a database is designed to do and can handle much faster.

            This is regardless of the flame wars of Postgres vs MySQL.

            [ Parent ]
            • Re:Foreign Keys by theonetruekeebler (Score:2) Monday December 18 2006, @04:59PM
          • Re:Foreign Keys by jaydonnell (Score:2) Monday December 18 2006, @01:08PM
          • Re:Foreign Keys by Ugot2BkidNme (Score:2) Monday December 18 2006, @02:54PM
        • Re:Foreign Keys (Score:4, Insightful)

          by cloudmaster (10662) on Monday December 18 2006, @11:03AM (#17286844)
          (http://www.cloudmaster.com/cloudmaster | Last Journal: Sunday May 07 2006, @10:01PM)
          Umm, I'm pretty sure that MySQL had had subselects for several years. It's not clear if you knew that or not.
          [ Parent ]
        • "Free" Oracle by Bilbo (Score:2) Monday December 18 2006, @11:19AM
        • Re:Foreign Keys (Score:4, Insightful)

          by poot_rootbeer (188613) on Monday December 18 2006, @12:01PM (#17287908)
          Foreign keys don't speed anything up, they just add an extra layer of checks on your database.

          Correct. That extra layer of checks will probably actually slow things down a bit.

          But foreign keys aren't about performance. They're about data integrity, which I would hope every database administrator or developer is more concerned with anyway. It doesn't matter how many requests/second your DBMS can handle if the data is fuxxored.

          Your app should be checking itself anyway.

          Yes, it should be catching "foreign key constraint violation" exceptions thrown by the DB interface and handling them appropriately. I hope that's what you meant.
          [ Parent ]
          • 1 reply beneath your current threshold.
        • Re:Foreign Keys (Score:5, Insightful)

          by tacocat (527354) <tallison1@ t w m i . r r.com> on Monday December 18 2006, @12:54PM (#17288818)

          When are you non-database types going to stop saying "Your app should be checking itself anyway."

          This is an insanely inneficient method of execution. It's also highly presumptive.

          Inneficient: If you are going to insert a record you have to first check to make sure it's not there. Then if it is there you have to change your INSERT to an UPDATE. This is dumb. Some databases do a INSERT OR UPDATE. but if they don't, it's faster to do an INSERT, handle failure, UPDATE. Alternatively -- UPDATE and INSERT on ZERO ROWS CHANGED. This means you have to run less than 2 queries on average. Your app should check method guarantees two SQL statements are executed every single time.

          Dumb. Say you check for a record to exist. You get a "NO" answer. While you are preparing and executing your next INSERT, some other process or a thread inserts that same record into the databse. Now you have an error and you still don't know what to do. In short, you're in a pretty bad way.

          Presumptive. In all my years of living I've never seen any company happy with the only interface to the data being through the application interface. Especially with a database on the back end. The business types, Marketing in partitular, love to screw with database information to try and identify trends, patterns, and correlations between the customer behaviour, product representation, and sales metrics. It is presumptive that the application can safely contain all of the business logic and you can assume that no one will ever come in the back end and change something -- thereby breaking all your business rules.

          The other consideration is that the business logic contained in a database is going to run a heck of a lot faster on the database than anything you can dream up in your application, unless the application is written in C. Databases are generally written in C/C++. Applications are generally written in Java,Perl,Python,Ruby. None of these can compete with C. Add to that the fact that databases have been designed for years to do only one thing -- manage data. Do you seriously think you can out perform a decade of database optimization in a ruby script?

          If you are going to base an application on data it would be useful to know how to capitalize on the features of a database rather than trying to repeat it. At the very least, you are less likely to introduce bugs.

          [ Parent ]
        • Re:Foreign Keys by nuzak (Score:3) Monday December 18 2006, @01:45PM
        • Hogwash by msobkow (Score:2) Monday December 18 2006, @03:10PM
      • Re:Foreign Keys (Score:5, Insightful)

        by CaptainZapp (182233) * on Monday December 18 2006, @09:04AM (#17285256)
        (http://etoy.com/)
        Foreign keys are more than nice, they are essential.

        Bingo!

        It doesn't cease to amaze me, when the Mysql croud argues that "you don't really need those pesky integrity stuff, it just slows down the database."

        Guess what guys; You're dead wrong!

        Any DBA worth his salary will enforce data integrity on the lowest possible level, which means constraints (however implemented) on the object level.

        Sure, you can let your coders in Bengaluru ensure that the primary key is unique instead of just applying a unique index and the same goes for referential constraints between tables. You can implement them in the application just fine until somebody overlooks some minor detail in the code and you're royally fucked!

        Again! Foreign keys or triggers are not "niceties". They are essential in implementing an industry strength database; period!

        [ Parent ]
      • Re:Foreign Keys by fm6 (Score:2) Monday December 18 2006, @05:14PM
      • Re:Foreign Keys by Doctor Memory (Score:2) Monday December 18 2006, @12:55PM
        • 1 reply beneath your current threshold.
      • Re:Foreign Keys by angulion (Score:1) Monday December 18 2006, @04:56PM
      • 1 reply beneath your current threshold.
    • Re:Foreign Keys (Score:5, Informative)

      by ShieldW0lf (601553) on Monday December 18 2006, @08:39AM (#17285048)
      This is unbiased? Give me a break.

      WTF is with putting up an "unbiased comparison" between Postgres 7.2 and MySQL 5.0 when Postgres is now up to 8.2 and has most of their concerns addressed in that release, whereas MySQL is still at 5.0?

      MySQL is a great database, if you need clustering but not referencial integrity or ACID compliance, that is.

      [ Parent ]
    • Re:Foreign Keys by Brummund (Score:3) Monday December 18 2006, @08:54AM
    • Re:Foreign Keys by JustOK (Score:1) Monday December 18 2006, @08:56AM
    • Re:Foreign Keys by bubulubugoth (Score:1) Monday December 18 2006, @09:05AM
    • Re:Foreign Keys by hey! (Score:2) Monday December 18 2006, @09:11AM
    • Re:I use PostgreSQL by jellomizer (Score:2) Monday December 18 2006, @10:14AM
    • 2 replies beneath your current threshold.
  • No Digg (Score:5, Informative)

    1. There's no such thing as unbiased. Especially on a page that gives a fairly abstract review.

    2. This article is 2 years old. Everything in its comparisons is out of date.
    • And it sucks anyway. by khasim (Score:1) Monday December 18 2006, @08:37AM
    • Re:No Digg by TracerRX (Score:1) Monday December 18 2006, @08:38AM
    • Re:No Digg by suso (Score:2) Monday December 18 2006, @08:43AM
      • 1 reply beneath your current threshold.
    • Re:No Digg by TrappedByMyself (Score:2) Monday December 18 2006, @08:57AM
    • Re:No Digg (Score:5, Informative)

      by electroniceric (468976) on Monday December 18 2006, @08:59AM (#17285212)
      Just to continue on your good points, especially troubling is the fact that this article compares the then-unreleased MySQL 5 to the Postgres 7.x series. Nearly all the drawbacks to Postgres that this article highlights have been addressed in the 8.x series.

      We run Postgres for our main business application and the main limitations are of two forms:
      1) Depth of community
      The Postgres community is great - very responsive and knowledgeable, but its size is a limitation in a number of ways. The ODBC driver is a bit of stepchild to the main project, and some key functions like dblink that address missing features like cross-database selects are relegated to /contrib, and rely on their individual authors for nearly all maintenance. This means that as a user you are more likely to bump up against the bleeding edge earlier than in communities where these outside-the-core projects are more supported.

      For the same reason a key subset of its documentation is very sparse. Documentation for the core system is thorough, clear and concise, but anything in contrib or any projects like the ODBC or .NET drivers are much less like to have the same quality of documentaton. Postgres' extremely powerful GIST indexes are unparalled as a feature, but you need a background in theoretical CompSci to figure them out, thanks to limited documentation (note to aspire database index geeks - I would gladly buy a book on GIST aimed at proficient DBAs who are not giants of theoretical CS). Likewise its procedural languages: thanks to its architecture and open codebase, Postgres offers more server-side languages than any other database that I know of, but few of them have more than basic documentation, let alone the stacks of books you'd find with other procedural languages.

      2) Postgres is very close to being a true enterprise contender (unlike MySQL, which is evolving that direction but distinctly further off), but lacks some key features like XML handling, a more comprehensible approach to result sets (anyone who's dealt with rowtypes and casting resultsets can attest to the steep learning curve), and a userbase that has put the product through the wringer. Now that some corporate heads are getting interested (e.g. Sun, Red Hat, EnterpriseDB) hopefully some of these shortcomings will be addressed in short order.

      Don't let this outdated, apples to oranges comparison fool you: Postgres is a very solid and usable database.
      [ Parent ]
    • Re:No Digg by archen (Score:1) Monday December 18 2006, @10:19AM
  • Old news (Score:5, Informative)

    by daffmeister (602502) on Monday December 18 2006, @08:31AM (#17284944)
    (http://www.davidjennings.net/)
    From the site:

    "Last modified: February 15, 2005."
  • by Tetard (202140) on Monday December 18 2006, @08:31AM (#17284950)
    MySQL does not have tablespaces, only recently support for views, subselects, transactions was added and triggers and stored procedures are still considered alpha. No bitmap indexes... This is by far not the best comparison I've ever seen.

  • stability (Score:2, Informative)

    by oliverthered (187439) <oliverthered&hotmail,com> on Monday December 18 2006, @08:32AM (#17284958)
    Having foreign keys, views, subselects, and transactions can all be very attractive in PostgreSql -
    if you need them and you will make any use of them. If you don't need them or won't use them, then
    you're probably better off with MySQL and its superior performance.


    PostgreSql is more stable than MySQL, (and has better performance when saturated), shouldn't you take that into consideration?
    • Re:stability by TheRaven64 (Score:3) Monday December 18 2006, @08:56AM
      • Re:stability by scribblej (Score:3) Monday December 18 2006, @10:16AM
        • Re:stability by edwdig (Score:2) Monday December 18 2006, @11:13PM
      • Re:stability by Blimey85 (Score:3) Monday December 18 2006, @10:38AM
        • Re:stability by oliverthered (Score:1) Tuesday December 19 2006, @07:51AM
          • Re:stability by Blimey85 (Score:2) Tuesday December 19 2006, @01:36PM
      • Re:stability by rycamor (Score:3) Monday December 18 2006, @11:06AM
        • 1 reply beneath your current threshold.
      • Re:stability by localman (Score:3) Monday December 18 2006, @12:47PM
        • Re:stability by Ugot2BkidNme (Score:1) Monday December 18 2006, @03:54PM
        • Re:stability by ThePhilips (Score:2) Tuesday December 19 2006, @05:44PM
        • Re:stability by localman (Score:2) Tuesday December 19 2006, @01:48AM
        • 1 reply beneath your current threshold.
      • Re:stability by slamb (Score:2) Monday December 18 2006, @02:33PM
  • Old and wrong (Score:5, Informative)

    by ldapboy (946366) on Monday December 18 2006, @08:32AM (#17284962)
    postgresql has a native Win32 version, complete with an installer, service support and does not depend on cygwin.
  • Unbiased ? (Score:2, Interesting)

    by UncleH (8863) on Monday December 18 2006, @08:34AM (#17284974)
    Just take a look at the description per item. I couldn't possibly call this unbiased in any way.
  • Out of date? (Score:1, Redundant)

    by zootm (850416) on Monday December 18 2006, @08:36AM (#17285002)

    Last modified: February 15, 2005.

    Surely, given the speed that these suites tend to be developed, this comparison is tragically out of date by now? There were a few pieces of comparison which gave the impression that it needed to be updated ("Expect PostgreSQL 8.x to continue this trend."), and I'm fairly sure that both systems have advanced considerably in most, if not all, of the criteria specified.

  • biased (Score:1)

    by dheera (1003686) on Monday December 18 2006, @08:36AM (#17285008)
    (http://dheera.net/)
    who said everything done by the government needs to be unbiased? this isn't the court or the elections or something, this is them deciding on a piece of software to use. for a little crap decision like this they should pick whatever makes them most comfortable and crank out the data everyone wants.

    i think mysql is better because of the name... "post-greeeeee-SQL" sounds awful.
    • Re:biased by kdemetter (Score:1) Monday December 18 2006, @09:05AM
    • Re:biased by iangreen (Score:1) Thursday December 21 2006, @03:59PM
    • 1 reply beneath your current threshold.
  • Not similar to my experience (Score:5, Informative)

    by seebs (15766) on Monday December 18 2006, @08:36AM (#17285010)
    (http://www.seebs.net/)
    I have been involved with a smallish ("hundreds") installation of Movable Type using a mysql backend.

    One comment spammer can completely annihilate it.

    One developer I talked to once did some testing. On one simultaneous connection, mysql was way faster. By five or so, they were close. At ten, PostgreSQL was definitely winning. At a hundred, he was simply unable to get a single MySQL server to complete the test successfully, let alone do it quickly.

    The impression I get is that PostgreSQL uses more robust algorithms, with higher constant costs and lower quadratic costs. In any event, never had any problems.

    As noted elsewhere, these comparisons are quite old...

    But in any event, in my own experience, mysql is a lot easier to blow up by overloading than postgres is, at least if you have a lot of writes going on. For pure-lookup functions, it might do better -- but a lot of modern database apps are pretty compulsive about saving at least something every time someone touches them. (For instance, modern vBulletin saves last visits, threads seen, and so on; all of that adds up to a huge load on the database server.)
  • by Anonymous Coward on Monday December 18 2006, @08:37AM (#17285020)
    Glad to see the comparison, but I would really like to see is a comparison that includes the new 2.0 release of Firebird. Their new release is impressive, but I dont know how the features pan out with MySQL or Postgres. Including Derby would also be nice.

    The most important factor to me in any comparison is the licensing agreement. I like a very open agreement and the MySQL license requires you to release the source code to your product in some cases, or you have to purchase a license from them.

  • by MikeRT (947531) on Monday December 18 2006, @08:38AM (#17285038)
    (http://www.codemonkeyramblings.com/)
    You have to give the MySQL guys credit for the fact that it is an incredibly easy product when it comes to configuring it for your needs. For me, out of college, going to Oracle was a culture shock because the process of configuring Oracle was so convoluted and drawn out for simple stuff. I know that Oracle and PostgreSQL can be much more powerful than MySQL, but there is something to be said for how easy it is for a developer to install MySQL and just start working with it.