Re: Strange (?) Index behavior?

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Allen Landsidel <alandsidel(at)gmail(dot)com>
Cc: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Strange (?) Index behavior?
Date: 2004-11-05 15:07:38
Message-ID: 1099667258.1647.827.camel@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> It seems to me that a query saying "SELECT column FROM table WHERE
> column LIKE 'AA%';" should be just as fast or very close to the first
> case up above. However, explain tells me that this query is not using
> the index above, which is what's not making sense to me.

It looks for an exact expression match, and doesn't know about values
which are equal.

You can provide both clauses.

WHERE column LIKE 'A%' and column LIKE 'AA%';

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Allen Landsidel 2004-11-05 15:32:43 Re: Strange (?) Index behavior?
Previous Message Matt Clark 2004-11-05 15:06:32 Re: Strange (?) Index behavior?