X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 939329DCC83 for ; Wed, 21 Dec 2005 22:52:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76213-04 for ; Wed, 21 Dec 2005 22:52:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.201]) by postgresql.org (Postfix) with ESMTP id 46E099DCC74 for ; Wed, 21 Dec 2005 22:51:59 -0400 (AST) Received: by xproxy.gmail.com with SMTP id s14so196840wxc for ; Wed, 21 Dec 2005 18:52:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=FQnFHQKg+0ICvLzLZttpuHmQFR4VRVcmFxIqVJLFkokBpLfWh7I+LSkWvYpgUc8xg69+jiSD3OyO6epfqOfkgDgH27o0ABbvtpW9FyDpYn8Hk7OAImCWLQqMWddtlMjMMKiXd7CClskXzz9/igxt0cO/AtcAxIYK+4UEOlNQN1A= Received: by 10.70.21.18 with SMTP id 18mr1401637wxu; Wed, 21 Dec 2005 18:52:03 -0800 (PST) Received: from ?192.168.1.100? ( [67.44.112.218]) by mx.gmail.com with ESMTP id i16sm2184112wxd.2005.12.21.18.51.49; Wed, 21 Dec 2005 18:52:03 -0800 (PST) From: Kevin Brown To: Madison Kelly , pgsql-performance@postgresql.org Subject: Re: MySQL is faster than PgSQL but a large margin in my program... any ideas why? Date: Wed, 21 Dec 2005 20:44:53 -0600 User-Agent: KMail/1.8 References: <43AA0966.6090401@alteeve.com> <20051222021418.GB6026@ns.snowman.net> In-Reply-To: <20051222021418.GB6026@ns.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512212044.53501.blargity@gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/554 X-Sequence-Number: 16375 On Wednesday 21 December 2005 20:14, Stephen Frost wrote: > * Madison Kelly (linux@alteeve.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.