Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2698

caching collation elements in WorkHorseForCollatorDatatypes may improve performance.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 10.3.1.4
    • None
    • SQL
    • Normal

    Description

      In java/engine/org/apache/derby/iapi/types/WorkHorseForCollatorDatatypes.getCollationElementsForString() an array
      of int's is calculated given the string and the collator in place. If like is ever called on the same DataValueDescriptor, caching
      this calculation will be faster than redoing the calculation. To make this change one needs to properly invalidate the cached
      information when the base type value is changed. For instance in the case of SQLChar() the following routines all result
      in a change in the value of the datatype and thus need to invalidate any cached collation element structure:
      readExternalFromArray()
      readExternal()
      setValue()
      there may be others.

      DERBY-2670 is an example of what can go wrong if you get the caching wrong.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mikem Mike Matrigali
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: