X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AF0589FA48D for ; Wed, 13 Sep 2006 12:32:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 22555-10 for ; Wed, 13 Sep 2006 15:32:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5847E9FA380 for ; Wed, 13 Sep 2006 12:32:49 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8DFWmEq012098; Wed, 13 Sep 2006 11:32:48 -0400 (EDT) To: yoav x cc: pgsql-performance@postgresql.org Subject: Re: sql-bench In-reply-to: <20060913122414.16995.qmail@web35811.mail.mud.yahoo.com> References: <20060913122414.16995.qmail@web35811.mail.mud.yahoo.com> Comments: In-reply-to yoav x message dated "Wed, 13 Sep 2006 05:24:14 -0700" Date: Wed, 13 Sep 2006 11:32:48 -0400 Message-ID: <12097.1158161568@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/120 X-Sequence-Number: 20806 yoav x writes: > Are there any tuning parameters that can be changed to speed these > queries? Or are these queries especially tuned to show MySQL's > stgrenths? The latter. I've ranted about this before --- there are both obvious and subtle biases in that benchmark. The last time I spent any time with it, I ended up testing with these nondefault settings: shared_buffers = 10000 work_mem = 100000 maintenance_work_mem = 100000 fsync = false checkpoint_segments = 30 max_locks_per_transaction = 128 (fsync = false is pretty bogus for production purposes, but if you're comparing to mysql using myisam tables, I think it's a reasonably fair basis for comparison, as myisam is certainly not crash-safe. It'd be interesting to see what mysql's performance looks like on this test using innodb tables, which should be compared against fsync = true ... but I don't know how to change it to get all the tables to be innodb.) Also, on some of the tests it makes a material difference whether you are using C locale or some other one --- C is faster. And make sure you have a recent version of DBD::Pg --- a year or two back I recall seeing the perl test program eating more CPU than the backend in some of these tests, because of inefficiencies in DBD::Pg. IIRC, with these settings PG 8.0 seemed to be about half the speed of mysql 5.0 w/myisam, which is probably somewhere in the ballpark of the truth for tests of this nature, ie, single query stream of fairly simple queries. If you try concurrent-update scenarios or something that stresses planning ability you may arrive at different results though. I have not retested with more recent versions. regards, tom lane