Andrus wrote:
So
CREATE INDEX i1 ON foo(col1);
cannot be used to optimize queries of type "get all rows where first n
charaters of col1 are known" in Postgres.
Of course it will! Any btree based index will let you do that. Re-read
the previous answers and make sure you pay attention to the bit about
text_pattern_ops and LIKE in non-C locales.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq