Locale vs LIKE

Started by Stephen Dennealmost 18 years ago2 messages
#1Stephen Denne
Stephen.Denne@datamail.co.nz

Given the improvements in 8.3 listed in the release notes:
- Improve efficiency of LIKE/ILIKE, especially for multi-byte character sets like UTF-8 (Andrew, Itagaki Takahiro)

Does this still hold:
http://www.postgresql.org/docs/8.3/interactive/locale.html

"The drawback of using locales other than C or POSIX in PostgreSQL is its performance impact. It slows character handling and prevents ordinary indexes from being used by LIKE. For this reason use locales only if you actually need them."

i.e. Do I still have to either initdb --locale=C or explicitly use text_pattern_ops?

(Queries include predicates of the form [indexed text expression] like "ABC%")

Stephen Denne

Disclaimer:
At the Datamail Group we value team commitment, respect, achievement, customer focus, and courage. This email with any attachments is confidential and may be subject to legal privilege. If it is not intended for you please advise by reply immediately, destroy it and do not copy, disclose or use it in any way.

__________________________________________________________________
This email has been scanned by the DMZGlobal Business Quality
Electronic Messaging Suite.
Please see http://www.dmzglobal.com/services/bqem.htm for details.
__________________________________________________________________

#2Gregory Stark
stark@enterprisedb.com
In reply to: Stephen Denne (#1)
Re: Locale vs LIKE

"Stephen Denne" <Stephen.Denne@datamail.co.nz> writes:

i.e. Do I still have to either initdb --locale=C or explicitly use
text_pattern_ops?

yes, if you want an index to be used

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!