X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3AAC056414 for ; Thu, 3 Mar 2005 05:37:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33015-02 for ; Thu, 3 Mar 2005 05:37:13 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id E8A9856491 for ; Thu, 3 Mar 2005 05:37:12 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7086511; Wed, 02 Mar 2005 21:38:59 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: "Ken Egervari" Subject: Re: Help with tuning this query Date: Wed, 2 Mar 2005 21:36:23 -0800 User-Agent: KMail/1.6.2 Cc: References: <001001c51ef4$3849eeb0$6a01a8c0@KEN> In-Reply-To: <001001c51ef4$3849eeb0$6a01a8c0@KEN> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200503022136.23275.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/48 X-Sequence-Number: 10753 Ken, > I've tried to use Dan Tow's tuning method and created all the right index= es > from his diagraming method, but the query still performs quite slow both > inside the application and just inside pgadmin III. =C2=A0Can anyone be k= ind > enough to help me tune it so that it performs better in postgres? =C2=A0I= don't > think it's using the right indexes, or maybe postgres needs special > treatment. =46WIW, I picked up Dan Tow's book to give it a read, and they guy isn't=20 qualified to author "SQL Tuning". You should chuck that book, it won't he= lp=20 you -- not with Oracle or SQL Server, and certainly not with PostgreSQL. = =20 O'Reilly continues to have trouble turning out quality database books. Also, if you *were* using Dan's method, you'd be driving off Person, not=20 Shipment. =2D-=20 Josh Berkus Aglio Database Solutions San Francisco