Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For the same data set, with mostly text data, how do the data (table + index) size of Postgresql compared to that of MySQL?

  • Postgresql uses MVCC, that would suggest its data size would be bigger

  • In this presentation, the largest blog site in Japan talked about their migration from Postgresql to MySQL. One of their reasons for moving away from Postgresql was that data size in Postgresql was too large (p. 41): Migrating from PostgreSQL to MySQL at Cocolog, Japan's Largest Blog Community

  • Postgresql has data compression, so that should make the data size smaller. But MySQL Plugin also has compression.

Does anyone have any actual experience about how the data sizes of Postgresql & MySQL compare to each other?

share|improve this question
    
I guess this is more scalated to your needs instead of which one is better there will be cases where PostgreSQL surpass MySQL by far as there are points where it is the other way around. I would like to know what is your current situation to be questionning which database you should be using first ... –  Prix Aug 16 '10 at 1:50
    
MySQL (when using InnoDB) also does MVCC: dev.mysql.com/doc/refman/5.1/en/innodb-multi-versioning.html –  joschi Aug 16 '10 at 6:02

1 Answer 1

up vote 1 down vote accepted

MySQL does use MVCC if your tables are in InnoDB format, which they should be unless you have a specific reason to use MyISAM. There are pros and cons for both. If your primary concern is data-size, MySQL offers several plugins, one of which is compressed MyISAM tables, which can make the data-size very small.

When picking one or the other, you should examine your complete use case before making a selection. Data-size is one factor, but it really depends on your usage. If it's for a web-based service of sorts, MySQL is usually a good candidate as it performs well with read-intensive workloads (which most websites are). MySQL also supports replication inherently (albeit asynchronously). If it's something more specific, Postgres may be a better option.

You should also take a close look at Percona's MySQL Server (http://www.percona.com/software/percona-server/). It's based off MySQL and offers a HUGE performance improvement over the standard MySQL builds. It's very well supported and constantly being improved. My feeling is that Percona MySQL Server will probably meet your requirements.

Hope this helps!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.