Subject Re: [Firebird-Architect] Re: UTF-8 (various)
Author Jim Starkey
Alexandre Benson Smith wrote:

>Jim Starkey wrote:
>
>
>
>>Collation is also requires to evaluate greater than / less than. The
>>collation that a program is expecting is a great deal more important
>>than how a particular index was defined. It boils down to the
>>fundamental question: Which is more important, going fast or getting the
>>right answer. If the pick the former, all queries can return 13.
>>
>>
>>
>>
>If I understand right, will be a problem on how to create indices if we
>have a common chasert inside de engine and how those index will be
>evaluated with different charsets/collations define by sessions
>(queries), taking this, won't be enough if the create index statement to
>have another clause the specifies the collation order ?
>
>Something like
>
>Create index MyIndex on MyTable(MyColumnA) collate PT_BR
>
>When the query will be execute using a charset ISO8859_1 and PT_BR
>collation the index could be used, if another session (query ?) execute
>the same query but uses a diferent charset/collation the index coud not
>be used.
>
>
Any index can be used for equality retrievals, which probably constitute
99% of all index retrievals. Only index range retrievals require that
the collation of the index match the collation of session/query. If all
indexes are based on UTF-8, the character set used by the client doesn't
come into the equation at all.