Re: why is index not used? - Mailing list pgsql-novice

From Marcin Krol
Subject Re: why is index not used?
Date
Msg-id 49075E5E.6040701@gmail.com
Whole thread Raw
In response to Re: why is index not used?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Tom Lane wrote:
> The other point is that in non-C locales, a standard varchar index isn't
> usable for LIKE (the sort order is usually wrong).  You can re-initdb
> in C locale or create a varchar_pattern_ops index.

booktown=# create index first_name_idx_vpo on auth using btree
(first_name varchar_pattern_ops);

Yeehaw! Now it works. Thanks Tom!



pgsql-novice by date:

Previous
From: "JORGE MALDONADO"
Date:
Subject: DATABASE INDEX DESIGN
Next
From: "JORGE MALDONADO"
Date:
Subject: FOREIGN KEY AND INDEXEX