[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: mysql vs. postgresql




On 19 Dec 2001, Paul Smith wrote:

> %% martin f krafft <madduck@madduck.net> writes:
>
>   mfk> a client of one of my servers has recently requested mysql. i
>   mfk> need postgres, so i'd install mysql in parallel, but i first
>   mfk> would like to know about the negative aspects. from what i
>   mfk> remember, mysql isn't a true database, and security isn't one of
>   mfk> it's virtues.
>
> Of course it's a "true database".  Postgres does support more SQL
> features than MySQL, but MySQL has all the basics.  The main features
> most DB developers miss in MySQL are subselects (coming soon I think)
> and transactions (ditto).
>
> I know of no reason at all that MySQL would be considered less secure
> than Postgres, assuming you mean "secure" as in people getting
> unauthorized access to your database.
>
> MySQL has a much larger installed userbase than Postgres so you're
> likely to get a lot more clients using it.  It is generally considered
> to be faster and consume less system resources for straightforward DB
> work, most especially SELECT.  It's really tuned for a "read-often,
> update-more-rarely" environment, typical of most web sites for example.

This would be true if it was true, but it isn't.  MySQL is really unsuited
to multiple readers, unless the reads are trivial select-one-row-by-id
jobs.  Whenever MySQL needs to make a temporary table to store an
intermediate result, that job will block all other jobs on the table:
selects, updates, and insert.  Concurrency is the main reason I switched
from MySQL to Postgres.

Here's an anecdote from the Geocrawler people, who found that Postgres
serves queries more quickly to more people in read-only and read-write
situations:

http://www.phpbuilder.com/columns/tim20001112.php3?print_mode=1

-jwb



Reply to: