Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 79A542E3041 for ; Thu, 6 Mar 2008 13:26:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84812-04 for ; Thu, 6 Mar 2008 13:26:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from davinci.ethosmedia.com (unknown [209.128.84.227]) by postgresql.org (Postfix) with ESMTP id 4F9A52E303C for ; Thu, 6 Mar 2008 13:26:46 -0400 (AST) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO [192.168.2.3]) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 15722338; Thu, 06 Mar 2008 09:31:44 -0800 From: Josh Berkus Organization: PostgreSQL @ Sun To: pgsql-performance@postgresql.org Subject: Re: Why the difference in plans ? Date: Thu, 6 Mar 2008 09:26:38 -0800 User-Agent: KMail/1.8.2 Cc: Dave Cramer References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060926.38708.josh@agliodbs.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/132 X-Sequence-Number: 29086 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. -- Josh Berkus PostgreSQL @ Sun San Francisco