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

Add caching of store stream length in StoreStreamClob, if appropriate

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4
    • 10.4.2.1, 10.5.1.1
    • JDBC
    • None
    • Performance

    Description

      Currently StoreStreamClob reads the whole Clob stream, including decoding it, to find the length of it. It also does this the second time the length is asked for.
      StoreStreamClob is the internal Clob representation for Clobs that are read-only. As soon as the user updates the Clob, it is transferred to a modifiable Clob representation.

      It should be determined if it is safe to cache the length (both in bytes and in characters) of the store stream to improve the performance and reduce the load on Derby for certain Clob operations.
      To do this, the locking mechanism used for Clobs must be analyzed.

      If you have obtained a Clob object, is there a lock in place that stops others from changing the content?
      For all isolation levels?
      What about scrollable result sets?
      Can the streamed content from store be changed under us, and thus invalidate a cached length?

      Attachments

        1. derby-2822-1a-cacheCharLength.diff
          2 kB
          Kristian Waagan
        2. derby-2822-1b-cacheCharLength.diff
          2 kB
          Kristian Waagan

        Activity

          People

            kristwaa Kristian Waagan
            kristwaa Kristian Waagan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: