X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5FE96D1B450 for ; Fri, 9 Jan 2004 03:23:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 28314-06 for ; Thu, 8 Jan 2004 23:23:05 -0400 (AST) Received: from mail.hive.nj2.inquent.com (mc.carriermail.com [205.178.180.9]) by svr1.postgresql.org (Postfix) with SMTP id 082E7D1B482 for ; Thu, 8 Jan 2004 23:17:04 -0400 (AST) Received: (qmail 16135 invoked from network); 9 Jan 2004 03:17:34 -0000 Received: from unknown (HELO ?192.168.1.199?) (134.22.68.14) by 205.178.180.9 with SMTP; 9 Jan 2004 03:17:34 -0000 Subject: Re: optimizing Postgres queries From: Rod Taylor To: David Teran Cc: Tom Lane , Postgresql Performance In-Reply-To: <6F2414E8-3FB9-11D8-A528-000A95A6F0DC@cluster9.com> References: <4B0023AC-3F72-11D8-B3EB-000A95A6F0DC@cluster9.com> <200401051705.55120.shridhar_daithankar@myrealbox.com> <64C8DBBA-3F77-11D8-A528-000A95A6F0DC@cluster9.com> <200401051740.05006.shridhar_daithankar@myrealbox.com> <3796212E-3F79-11D8-A528-000A95A6F0DC@cluster9.com> <9966.1073316152@sss.pgh.pa.us> <9CC6A792-3FAF-11D8-A528-000A95A6F0DC@cluster9.com> <16230.1073328760@sss.pgh.pa.us> <20540.1073329548@sss.pgh.pa.us> <4530AF9E-3FB4-11D8-A528-000A95A6F0DC@cluster9.com> <20759.1073330625@sss.pgh.pa.us> <6F2414E8-3FB9-11D8-A528-000A95A6F0DC@cluster9.com> Content-Type: text/plain Message-Id: <1073618208.322.18.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 08 Jan 2004 22:16:49 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/109 X-Sequence-Number: 5284 On Mon, 2004-01-05 at 14:57, David Teran wrote: > ... wow: > > executing a batch file with about 4250 selects, including lots of joins > other things PostgreSQL 7.4 is about 2 times faster than FrontBase > 3.6.27. OK, we will start to make larger tests but this is quite > interesting already: we did not optimize a lot, just invoked VACUUM > ANALYZE and then the selects ;-) > > Thanks to all who answered to this thread. I presume that batch file was executed linearly -- no parallelism? You're actually testing one of PostgreSQL's shortcomings. PostgreSQL (in my experience) does much better in such comparisons with a parallel load -- multiple connections executing varied work (short selects, complex selects, inserts, updates, deletes). Anyway, just a tip that you will want to test your actual load. If you do batch work with a single thread, what you have is fine. But if you have a website with tens or hundreds of simultaneous connections then your non-parallel testing will not reflect that work load.