cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] Commented: (CAY-1210) mysql does not use index for case insensitive searches
Date Wed, 12 Jan 2011 13:31:45 GMT


Andrus Adamchik commented on CAY-1210:

As recap of this thread on the dev list: I am
documenting a solution that we'll implement in 3.1:

* LIKE and LIKE IGNORE CASE processing in SelectQuery and EJBQLQuery should be abstracted
in a strategy interface (org.apache.cayenne.access.jdbc.LikeClauseGeneratorStrategy)
* Such strategy should be provided by DbAdapter.
* A strategy can be overridden via RuntimeProperties service (meaning this can be done either
via DI or from command line). 
* A name for the strategy property override is "cayenne.runtime.likeclausegenerator"

> mysql does not use index for case insensitive searches
> ------------------------------------------------------
>                 Key: CAY-1210
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Database integration
>            Reporter: Ari Maniatis
>            Assignee: Ari Maniatis
>             Fix For: 3.1M1
> When performing a case insensitive search Cayenne spits out SQL which looks like this
> SELECT .... WHERE upper(name) LIKE upper("fred")
> This prevents any index being used for the search. Since mysql already performed case
insensitive searches on text fields we need to suppress the 'upper' functions being used in
these situations. All searches on these fields are already case insensitive.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message