Received: from poseidon.good-day.co.jp (dns1.good-day.co.jp [211.5.178.66]) by hub.org (8.10.1/8.11.0) with ESMTP id e9Q48oE94497 for ; Thu, 26 Oct 2000 00:08:50 -0400 (EDT) (envelope-from hosokawa@good-day.co.jp) Received: from poseidon (localhost.poseidon.good-day.co.jp [127.0.0.1]) by poseidon.good-day.co.jp (Postfix) with SMTP id BB795405E for ; Thu, 26 Oct 2000 13:08:49 +0900 (JST) Date: Thu, 26 Oct 2000 13:08:49 +0900 From: Hosokawa Tetsuichi To: pgsql-sql@postgresql.org Subject: Re: Surprising sequence scan when function call used In-Reply-To: References: X-Mailer: Sylpheed version 0.4.3pre3 (GTK+ 1.2.8; Linux 2.2.17-0vl10; i686) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20001026040849.BB795405E@poseidon.good-day.co.jp> X-Archive-Number: 200010/233 X-Sequence-Number: 1900 see functional index On Wed, 25 Oct 2000 13:26:51 -0400 "Will Fitzgerald" wrote: > I have a table, login, which has a field by the same name; there's an index > on that field. I was surprised to discover that a SELECT which compares the > login field to a constant uses an Index scan, but if it is compared to a > function call--for example, lower()--a sequence scan is forced. > > Any idea why? -- * Hosokawa Tetsuichi * hosokawa@good-day.co.jp