When in doubt, try the explain command
Not exactly sure about postgres but in general LIKE can
only use an index in the case of LIKE "Something%"
LIKE "%Something" or LIKE "%Something%"
won't use an index since it would have to scan the entire
index to find all matches.
Alex.
On Wed, 14 Mar 2001, Alexander Jerusalem wrote:
> Hi,
>
> Can anyone telle me if and when a LIKE query uses an index? I've compiled
> postgres with locale support. Does that have any influence indexes?
>
> thanks,
>
> Alexander Jerusalem
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>