16 Jul, 2008

MySQL vs Postgres

Posted by Bhavin Turakhia

In my perpetual comparison between MySQL and Postgres I am beginning to lean towards MySQL offlate. There are many reasons, but a short list that is currently relevant to us is here -

  • MySQL supports multiple backend storage engines providing more flexibility of choice. For instance one can choose MyISAM for tables where transactions and ACID compliance does not matter, and gain a performance advantage. Or one can use a Memory storage engine for temporary in-memory tables
  • InnoDB supports optional MVCC, thus providing best of both worlds
  • MySQL supports native replication and shared nothing clusters
  • MySQL has better integration with memcached
  • MySQL uses multi-threading as opposed to process-forking, making it less heavy
  • More people are using MySQL than Postgres - eg Facebook, Youtube etc
  • MySQL is now owned by Sun, and despite their recent lay-offs they are a company I respect

There are many other reasons, but currently these are the ones that are relevant to the products we are working on.

Category : TechTalk

Comments
Devdas Bhagat
July 16, 2008

http://spyced.blogspot.com/2006/12/benchmark-postgresql-beats-stuffing.html

If you don’t need ACID compliance, don’t use the SQL hammer. There are better alternatives (memcached, BerkeleyDB for example).

PostgreSQL supports “in memory” tables (they are termed as TEMP tables there).

WRT replication: http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php

Sun employs a fair number of PostgreSQL developers, as does RedHat.

Yahoo! doesn’t use MySQL for important stuff, just long term caching. Note that NTT is slightly more interesting than Facebook for our use case(s).

amit shah
July 17, 2008

i don’t know much about this discussion in detail. but as per my information regarding “in memory” tables.

mysql have also a MEMORY (HEAP) storage engine.

http://dev.mysql.com/doc/refman/5.0/en/memory-storage-engine.html

Leave a comment

(required)

(required)


Note: Enter the text displayed in the image above for your comment to be posted.