db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Re: territory-based collations and optimizations for the LIKE operator
Date Fri, 22 Aug 2008 17:35:26 GMT
Rick, let me start out by answering your 1st question about LIKE
optimization. Yes, we do disable LIKE optimization if we are using
territory based collation. That behavior is the jira entry (DERBY-1478
 disable dynamic like optimization for collated databases)

I will need to do little more reading before I can answer question 2).

Mamta

On 8/22/08, Rick Hillegas <Richard.Hillegas@sun.com> wrote:
> According to the Developer's Guide section titled "Character-based collation
> in Derby", the LIKE operator behaves differently than the = operator. That
> is, if you are using a territory-based collation, two strings might = one
> another but not be LIKE one another (and vice-versa).
>
> In the meantime, according to the section in the Tuning Guide titled
> "Character string beginning with constant", LIKE expressions which begin
> with a constant (followed by a wildcard) can be transformed into indexable
> expressions involving the ">=" and "<" operators.
>
> To my muddled understanding, it seems that one of the following occurs:
>
> 1) The LIKE optimizations are disabled if you are using territory-based
> collation
>
> or
>
> 2) a LIKE expression may return different results depending on your indexes
> and/or the presence of trailing wildcards in your LIKE expression.
>
> (1) seems like a performance issue which needs to be documented. (2) seems
> like a correctness problem. What is the behavior that we expect?
>
> Thanks,
> -Rick
>

Mime
View raw message