Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 319D69F9A0C for ; Mon, 17 Sep 2007 21:13:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 98593-01-2 for ; Mon, 17 Sep 2007 21:13:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from tomts16-srv.bellnexxia.net (tomts16.bellnexxia.net [209.226.175.4]) by postgresql.org (Postfix) with ESMTP id 36E969F9D7F for ; Mon, 17 Sep 2007 21:12:43 -0300 (ADT) Received: from serenity ([70.52.75.201]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070918001241.RXFG574.tomts16-srv.bellnexxia.net@serenity>; Mon, 17 Sep 2007 20:12:41 -0400 From: "Carlo Stonebanks" To: "'Merlin Moncure'" Cc: References: In-Reply-To: Subject: Re: Query works when kludged, but would prefer "best practice" solution Date: Mon, 17 Sep 2007 20:13:18 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acf5h1qkV4/JNcPMSXmPqNzbvuWwVAAAPm3A X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16480 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/299 X-Sequence-Number: 26844 Well, there goes my dream of getting a recommendation that will deliver a blinding insight into how to speed up all of my queries a thousand-fold. Thanks Merlin! -----Original Message----- From: Merlin Moncure [mailto:mmoncure@gmail.com] Sent: September 17, 2007 8:03 PM To: Carlo Stonebanks Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Query works when kludged, but would prefer "best practice" solution On 9/17/07, Carlo Stonebanks wrote: > Hi all, > > Please see the section marked as "PROBLEM" in "ORIGINAL QUERY" plan below. > You can see it's pretty slow. Oddly enough, an index for facility_address_id > is available but not being used, but I suspect it's questionable whether it > would be an improvement. This looks like it might be the problem tom caught and rigged a solution to: http://people.planetpostgresql.org/dfetter/index.php?/archives/134-PostgreSQ L-Weekly-News-September-03-2007.html (look fro band-aid). If that's the case, the solution is to wait for 8.2.5 (coming soon). merlin