Re: PostgreSQL or MySQL ?
- From: Nis Jørgensen <nis@xxxxxxxxxxxxx>
- Date: Wed, 23 May 2007 02:13:21 +0200
jag skrev:
Hiya,
I'm planning to build an enterprise-level php web app which will be
used to manage a large amount of users and which will get a lot of
hits.
so, which database setup should i use?
got 2 choices,
PostgreSQL or MySQL
have used MySQL before but heard good stuff about PostgreSQL.
I have used both. Love Postgres. Hate MySQL.
People may tell you that Mysql has better performance. I believe a lot
of this comes from people doing single-table selects or simple joins
from ISAM tables. I have often been writing queries in Postgres that I
could never have done in MySQL - so when I was using MySQL, I would have
to code them procedurally on the webserver.
The documentation for Postgres is excellent. They have separate copies
online for the different versions, and clearly indicate the changes and
any deviations from the SQL standards.
The documentation for MySQL covers all versions at once. This means you
cannot just look at the syntax diagrams and assume that they apply to
the version you are running.
Postgres supports transactions, subselects, foreign keys, constraints,
updatable views (via RULES or TRIGGERS) and stored procedures/functions
in several languages - all in the standard configuration.
MySQL ... may support some of these out of the box, and most of them
with a little tweaking. Often they are implemented with gotcha's - "you
can't use a subselect there", "foreign keys only work with INNODB
tables" etc.
Postgres gives you meaningful error messages most of the time. MySQL
mostly just says "You have an error in your SQL syntax;"
And, IMNSHO, if you don't have time/money for a trained DBA - Postgres
beats Oracle as well, when it comes to maintenance AND performance.
Simply because it works out of the box, and the documentation is easy to
read and follow.
Enough evangelism, have a nice day
Nis
.
- Follow-Ups:
- Re: PostgreSQL or MySQL ?
- From: Bill Karwin
- Re: PostgreSQL or MySQL ?
- From: Thomas Kellerer
- Re: PostgreSQL or MySQL ?
- From: EricF
- Re: PostgreSQL or MySQL ?
- Prev by Date: php/mysql replace
- Next by Date: Re: some basic db questions
- Previous by thread: php/mysql replace
- Next by thread: Re: PostgreSQL or MySQL ?
- Index(es):
Relevant Pages
|