Search the MySQL manual:

1.10.2.2 Featurewise Comparison of MySQL and PostgreSQL

On the crash-me page (http://www.mysql.com/information/crash-me.php) you can find a list of those database constructs and limits that one can detect automatically with a program. Note, however, that a lot of the numerical limits may be changed with startup options for their respective databases. This web page is, however, extremely useful when you want to ensure that your applications work with many different databases or when you want to convert your application from one database to another.

MySQL Server offers the following advantages over PostgreSQL:

Drawbacks with MySQL Server compared to PostgreSQL:

PostgreSQL currently offers the following advantages over MySQL Server:

Note that because we know the MySQL road map, we have included in the following table the version when MySQL Server should support this feature. Unfortunately we couldn't do this for previous comparisons, because we don't know the PostgreSQL roadmap.

Feature MySQL version
Subqueries 4.1
Foreign keys 5.1 (3.23 with InnoDB)
Views 5.1
Stored procedures 5.0
Triggers 5.1
Unions 4.0
Full outer join 5.1
Constraints 5.1
Cursors 5.0
R-trees 4.1 (for MyISAM tables)
Inherited tables Not planned
Extensible type system Not planned

Other reasons someone may consider using PostgreSQL:

Drawbacks with PostgreSQL compared to MySQL Server:

For a complete list of drawbacks, you should also examine the first table in this section.

User Comments

Posted by Scott Marlowe on Friday October 11 2002, @12:03pm[Delete] [Edit]

Postgresql has 7.3 in beta testing, and we're
still comparing to 7.0.3? Come on, someone at
MySQL AB must have enough talent to get at least
7.2 up and running and do some comparisons to it,
and not a two year old code base. It makes us
look like cheerleaders, not engineers to compare
our database to a two year old version, especially
if our excuse is that we couldn't get vacuuming to
work reliably. I understand that all vacuum
issues were pretty much solved in the 7.2 release
from January 2002 or so.

Here are the points that I know are incorrect in
this page:

Vacuum no longer really affects performance, you
can run it during normal usage and it hardly
impacts performance. In some testing, I've run it
continuously while doing transactional work, and
the slow down was about 10%. That would hardly
qualify as "practically dead"

Postgresql comes with a complete regression test
package run by using "make test" which is quite
comprehensive.

What ODBC functions do we support that Postgresql
doesn't? I'm not really familiar with this part.

With 7.3 Postgresql's alter table will now have
drop column, so the argument about a more advanced
alter table may go away.

About table handlers, Postgresql does use one,
it's just that it's the only one it uses.

Postgresql autocompresses all text types (char,
varchar, text) so the argument for mysql's read
only compressed tables is weak, since with
postgresql you don't have to do anything to
compress text anyway.

The fact that Postgresql's full text search is
external actually reflects poorly on MySQL's lack
of easy extensibility. Postgresql now has three
different add on full text searches, two of which
are delivered as part of the contrib directory and
fairly easy to add.

Under Linux, threads and processes are pretty much
the same performance wise, so saying that being
multi-threaded makes a big difference on MySQL
should be limited to Solaris / Windows, where
threads are noticeably faster than processes.

Postgresql gets a fully functional priviledge
system for 7.3, which is in beta right now. So
that point may need more close examination.

Postgresql now has compression from client to
server in 7.3 as well.

All Postgresql tables are as well implemented as
files, but due to issues with >2 gig files on some
file systems auto splits them after they reach a
certain size. They still are capable of being
sym-linked elsewhere, just like with MySQL.

Postgresql has a similar program to mysql's isam
repair utility, it's just not very well known.

Most Postgresql upgrades can be accomplished in
place with the upgrade tool, but backups shold be
performed anyway just in case a bug corrupts your
data.

Posted by tim ellis on Sunday May 11 2003, @9:35pm[Delete] [Edit]

I am very keen to find out more about certain MySQL vs. PostgreSQL differences from an administration point of view.

I agree with Scott Marlowe, it appears as though this comparison is a bit out-of-date. For a user-editable MySQL vs. PostgreSQL comparison (which actually has bias toward PostgreSQL, since I'm the author) is at http://faemalia.org/wiki/view/Technical/PostgreSQLvsMySQL -- I would appreciate if MySQL gurus could give their opinion on that page, especially if you're an ADMINISTRATOR, not a DEVELOPER.

That page sets up the test in a certain fashion where MySQL will lose (ie: I want 24/7 uptime, and MySQL marketers conveniently forget to tell you there's no read-write backup for MySQL... the tables are in read-only mode whilst being backed up... which is a GIGANTIC HUGE GAPING HOLE that needs to be fixed).

There is another out-of-date comparison page (out-of-date like this page, but also pro-PostgreSQL) at the ACS "why not mysql" page: http://openacs.org/philosophy/why-not-mysql.

Add your own comment.