see
functional index
On Wed, 25 Oct 2000 13:26:51 -0400
"Will Fitzgerald" <[EMAIL PROTECTED]> 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 Ind
"Will Fitzgerald" <[EMAIL PROTECTED]> writes:
> vdsq=> explain select * from login where login.login = lower('foo');
> Seq Scan on login (cost=0.00..1361.86 rows=609 width=62)
7.0 is a little bit stupid about cross-data-type comparisons (lower()
yields text, not char(n)). This example works OK
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