Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D72142E2FC0 for ; Thu, 6 Mar 2008 14:56:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 03201-03-4 for ; Thu, 6 Mar 2008 14:56:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ebox1b.ebox.com (ebox1.ebox.com [64.7.141.6]) by postgresql.org (Postfix) with ESMTP id 454C82E2FC2 for ; Thu, 6 Mar 2008 14:56:25 -0400 (AST) Received: from [192.168.55.101] (static-64-201-160-109.ptr.terago.ca [64.201.160.109]) by ebox1b.ebox.com (Postfix) with ESMTP id 5F75117E0A4; Thu, 6 Mar 2008 13:56:23 -0500 (EST) Cc: pgsql-performance@postgresql.org Message-Id: From: Dave Cramer To: Josh Berkus In-Reply-To: <200803060926.38708.josh@agliodbs.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Why the difference in plans ? Date: Thu, 6 Mar 2008 13:56:19 -0500 References: <200803060926.38708.josh@agliodbs.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200803/136 X-Sequence-Number: 29090 On 6-Mar-08, at 12:26 PM, Josh Berkus wrote: > Dave, > >> Below I have two almost identical queries. Strangely enough the one >> that uses the index is slower ??? > > My first guess would be that records are highly correlated by DOB > and not at > all by name. However, it would help if you supplied both the index > definitions and what changed between the two queries to cause the > index to be > used. The two queries were run 2 seconds apart, there were no changes between. I'll get the index definitions. Dave > > > -- > Josh Berkus > PostgreSQL @ Sun > San Francisco > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org > ) > To make changes to your subscription: > http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-performance