MySQL or PostgreSQL?

topic posted Fri, July 9, 2004 - 9:58 AM by  Sergei
Share/Save/Bookmark
Advertisement
hello guys,

I am not sure whether to use MySQL or PostgreSQL for a project... which one do you think is better?? any ideas??

thanks,
posted by:
Sergei
Advertisement
Advertisement
  • Re: MySQL or PostgreSQL?

    Sat, July 10, 2004 - 1:14 AM
    I recently did some research on this exact topic for my work here are some links we looked at:

    www.devx.com/dbzone/Article/20743

    det-dbalice.if.pw.edu.pl/det-d...e.html

    The last link is about 4 years old, but VERY in depth.
    • Unsu...
       

      Re: MySQL or PostgreSQL?

      Sat, July 10, 2004 - 11:24 AM
      I am more impressed with PostreSQL than with MySQL.

      My impression is that PostgreSQL supports "units of work" and MySQL does not.

      In other words with PostgreSQL you can issue multiple sql update commands all as one transaction and then either commit them all or roll them all back.

      With MySQL you issue one update command at a time and either commit it or roll it back.
      • Unsu...
         

        Re: MySQL or PostgreSQL?

        Sat, July 10, 2004 - 1:18 PM
        I've used both. I guess the whole thing depends on how heavy the applications that will be using the database are. I'm using MySQL for websites right now, and it does fine for most things. Transactions are cool, but not always necessary. If you do anticipate the need for transactions, then you will need PostgreSQL, which AFAIK is ACID compliant, and IMHO competitive with Oracle.
      • Re: MySQL or PostgreSQL?

        Sun, July 11, 2004 - 9:50 PM
        Thanks..... seems that PostgreSQL will fit better my needs... clustering several commands as a transaction is desirable.
        • Re: MySQL or PostgreSQL?

          Mon, July 12, 2004 - 2:05 PM
          For quick and simple transactions all of the articles I have read say that MySQL is best with an out of the box setup. However if you require transactions and robustness then Postgres fits the bill. Many of the benchmarks I have read show that the overhead of the data integrity requirements slow down initial transactions. However that and the procedural language capability of Postgres make it overall more powerful.

          One thing to remember, when you are doing web based transactions you will most often want speed and in this regard MySQL is better. Also you can achieve a similar level of transactions with MySQL, it just takes a lot more work.

          Also look into the various java frontends. A very poor front end can make a fast database S L O W.
          • Unsu...
             

            Re: MySQL or PostgreSQL?

            Mon, January 3, 2005 - 3:35 PM
            Questions of speed aren't that easily settled. It depends on what your data looks like and how you use it. Note that out of the box mysql gives you table level locking and so will be dog slow if you are trying to do even simple queries against large tables if you have a lot of inserts and deletes. You can get row level locking with MySQL but I have not been impressed with the robustness of these implimentations ( there are several ways to hopelessly corrupt innodb tables, I've hit them several times, and I just wouldn't ever recommend them to anyone for any data that matters ). For that sort of lifting, postgres is a much better answer ( and, honestly, not any harder to seet up that mysql ).

            Note:
            - mysql had been less SQL compliant but has done a good job lately of cleaning that up a bit. But still, mysql has a way to go.
            - postgres had been trickier to to adminster for replication but slony has really made things nice in that regard for postgres

            The real bottom line when you are thinking about a database is a function of what your data model will be and how the database will be used. Answer that and you will know which solution will scale to your needs. And, always, if your data model is poor or your SQL is sloppy, then everything will be dog slow. Normalize your data and take the time to check expliain plans when you are comparing queries ( mysql and postgres both support this ).

Recent topics in "GNU & Free Software"

Topic Author Replies Last Post
Free Software Foundation Jim 0 August 16, 2007
New to Gnu Unsubscribed 4 August 5, 2007
Non-Profit Org to Commission Programmer[s] for OpenSource Free... change 0 March 18, 2007
A post from LVLUG Brian 0 January 8, 2006