Forum OpenACS Q&A: Response to Internationalization of OpenACS 4.5

Collapse
Posted by Don Baccus on
The performance issue with Postgres is only that expressions like:

string_row like 'foo%'

won't use the index on string_row if you've enabled locale support.  The problem is that indexing this relies on being able to translate the "like" into roughly:

string_row between 'foo' and ('foo' || -the-biggest-character-)

unfortunately there's no simple way to know what "the biggest character" is if locale support is enabled.

Regular operations like "string_row = 'foo'" can use an index on string_row.

So for "normal" code, this isn't a big deal.

The current PG tree_sortkey implementation uses varying bitstrings and is fully indexed regardless of locale support.  So I don't think enabling locale support will seriously impace the performance of an OpenACS 4.5/PG site.