Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B25649F986B for ; Mon, 17 Sep 2007 21:03:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75324-01 for ; Mon, 17 Sep 2007 21:03:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by postgresql.org (Postfix) with ESMTP id 38D6E9F986A for ; Mon, 17 Sep 2007 21:03:21 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id f5so1138478nfh for ; Mon, 17 Sep 2007 17:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=l5N0SeaHP3xwQHoHrw9RopklE1/TX98XfhqvQ+VEYDg=; b=YU7novPSsS1sXSRuf9B+kaE+lvVyGKFJnvSc3igF/la/TSYxTBeiz0c6EXKEsMMErb+Z+4/9ZSnZVpiU6M+9G5WmNOIlrEhiM9ZRA3kn6w+SacXxS0g2P8UCZxqByOhdmq1OgAGKvKxUxkHChUUGCYzrxffg5785x/jgHtF5HfE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=alS1AoAe0nc1oSwD4H0Ksm86DOnp19NnWjAq4ViLBFv/rUnbmmrgWRnty0CKPoUfF+Fi2xMCAQ146re3MLMzx3xQrP0ULj2EIhepwU/uozeseNslmwLNhA9BrEtp9PlvtAl1djoKHunIRfUoJfpqhJAOuOfRZDEz+sM0SuOE9WI= Received: by 10.78.180.16 with SMTP id c16mr3140002huf.1190073799583; Mon, 17 Sep 2007 17:03:19 -0700 (PDT) Received: by 10.78.18.9 with HTTP; Mon, 17 Sep 2007 17:03:19 -0700 (PDT) Message-ID: Date: Mon, 17 Sep 2007 20:03:19 -0400 From: "Merlin Moncure" To: "Carlo Stonebanks" Subject: Re: Query works when kludged, but would prefer "best practice" solution Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/298 X-Sequence-Number: 26843 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-PostgreSQL-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