Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1210

mysql does not use index for case insensitive searches

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1M3
    • Component/s: Database integration
    • Labels:
      None

      Description

      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.

      http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html

        Attachments

        1. case-insensitive-search.patch
          14 kB
          Dzmitry Kazimirchyk
        2. case-insensitive-search.patch
          25 kB
          Dzmitry Kazimirchyk

          Activity

            People

            • Assignee:
              ari Ari Maniatis
              Reporter:
              ari Ari Maniatis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: