PostgreSQL vs MySQL?

Damien Elmes resolve at repose.cx
Fri Apr 5 16:22:10 EST 2002


Matthew Hawkins <matthew at topic.com.au> writes:

> On Fri, 05 Apr 2002, Damien Elmes wrote:
>> We also see MySQL fall over sometimes for no apparent reason. With its lack of
>> real ACID support, I wouldn't want to use it in a place where the data was
>> actually important.

I'm not familiar with the current state of MySQL. But what of triggers?
Constraints? 

> Also, Postgres appears to have, in my experience and in the experience
> of many other people (check that website posted recently with the
> Postgres vs MySQL article), problems with corrupting data quite
> frequently, forcing rebuilds.  My suspicion is that it has something to
> do with the way postgres uses temporary tables and in some circumstances
> will just blat out the original DB with the entries in the temporary
> table.  It's all documented in the postgres doco, just funnily enough
> never marked up in big blinking lights "WILL CAUSE MASSIVE DATA CORRUPTION".

None of the postgres stuff I've worked on has even fallen over. I suspect our
anecdotes are not going to conclude much.

> SELECT * FROM table1 WHERE id IN (SELECT id FROM table2);
>
> can be rewritten as:
>
> SELECT table1.* FROM table1,table2 WHERE table1.id=table2.id;

But there's zero point on doing a subselect for an IN statement. Subselects are
not there to placate intellectually encumbered SQL writers - they are there for
the times when a join is not practical.

> I'm not claiming its possible to rewrite every situation, but it
> certainly seems valid to me to avoid using subselects wherever possible.
> No-one likes rewriting sloppy code because it means admitting they wrote
> sloppy code to begin with.  Get over it.

Now you're just being inflammatory. I'll take your enthusiasm with MySQL
onboard, but I still think "enterprise level" databases are not best served
with MySQL - though as a light-weight solution, it's very popular.

-- 
Damien Elmes




More information about the linux mailing list