You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2007/10/25 07:51:50 UTC
[jira] Resolved: (DERBY-3136) Cut down on object creations in LIKE
clause implementation of territory based characters.
[ https://issues.apache.org/jira/browse/DERBY-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mamta A. Satoor resolved DERBY-3136.
------------------------------------
Resolution: Fixed
Fix Version/s: 10.4.0.0
10.3.1.5
Merged changed from trunk into 10.3 codeline (revision 588148).
> Cut down on object creations in LIKE clause implementation of territory based characters.
> -----------------------------------------------------------------------------------------
>
> Key: DERBY-3136
> URL: https://issues.apache.org/jira/browse/DERBY-3136
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.3.1.5, 10.4.0.0
> Reporter: Mamta A. Satoor
> Assignee: Mamta A. Satoor
> Fix For: 10.3.1.5, 10.4.0.0
>
>
> The LIKE clause for territory based characters was implemented correctly based on SQL standards in DERBY-2967 but the object (String and CollationElementIterator) creations introduced in DERBY-2967 can be cut down by following Knut's simple solution. I am copying that solution from DERBY-2967. We should implement that solution to improve the performance of LIKE for territory based characters.
> **********copied from DERBY-2967**********************************************************
> Another simple way to cut down the string allocations... I think you could express iapi.types.Like:checkEquality() like this:
> if (val[vLoc] == pat[pLoc]) {
> // same character, so two strings consisting of this
> // single character must be equal regardless of territory
> return true;
> } else if (collator == null) {
> // not same character, must be unequal in UCS_BASIC
> return false;
> }
> String s1 = new String(val, vLoc, 1);
> String s1 = new String(pat, pLoc, 1);
> return collator.compare(s1, s2) == 0;
> This would only allocate new objects if the characters are not equal.
> ******************************************************************************************
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.