Re: MySQL is faster than PgSQL but a large margin in my program... any ideas why?

From: Kevin Brown <blargity(at)gmail(dot)com>
To: Madison Kelly <linux(at)alteeve(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: MySQL is faster than PgSQL but a large margin in my program... any ideas why?
Date: 2005-12-22 02:44:53
Message-ID: 200512212044.53501.blargity@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wednesday 21 December 2005 20:14, Stephen Frost wrote:
> * Madison Kelly (linux(at)alteeve(dot)com) wrote:
> > If the performace difference comes from the 'COPY...' command being
> > slower because of the automatic quoting can I somehow tell PostgreSQL
> > that the data is pre-quoted? Could the performance difference be
> > something else?
>
> I doubt the issue is with the COPY command being slower than INSERTs
> (I'd expect the opposite generally, actually...). What's the table type
> of the MySQL tables? Is it MyISAM or InnoDB (I think those are the main
> alternatives)? IIRC, MyISAM doesn't do ACID and isn't transaction safe,
> and has problems with data reliability (aiui, equivilant to doing 'fsync
> = false' for Postgres). InnoDB, again iirc, is transaction safe and
> whatnot, and more akin to the default PostgreSQL setup.
>
> I expect some others will comment along these lines too, if my response
> isn't entirely clear. :)

Is fsync() on in your postgres config? If so, that's why you're slower. The
default is to have it on for stability (writes are forced to disk). It is
quite a bit slower than just allowing the write caches to do their job, but
more stable. MySQL does not force writes to disk.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Juan Casero 2005-12-22 03:09:48 Re: What's the best hardver for PostgreSQL 8.1?
Previous Message Stephen Frost 2005-12-22 02:14:18 Re: MySQL is faster than PgSQL but a large margin in my program... any ideas why?