Search Postgresql Archives

Re: Best way to use indexes for partial match at beginning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux