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

OutOfMemoryError with Clob or Blob hash join: DataTypeDescriptor.estimatedMemoryUsage() has no case for BLOB or CLOB so would underestimate memory usage for those types at zero


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s:,,,,,,,,,
    • Fix Version/s:
    • Component/s: SQL


      In discussion on derby-dev regarding how much memory is used for hash joins, Knut noted:

      I haven't verified, but I think HashJoinStrategy uses
      DataTypeDescriptor.estimatedMemoryUsage() to estimate how much memory
      the hash table will consume. That method has no case for BLOB or CLOB,
      so it looks as if it will return zero for LOB columns. If that's so, it
      will definitely overestimate how many rows fits in maxMemoryPerTable
      kilobytes if the rows contain LOBs.

      DataTypeDescriptor.estimatedMemoryUsage() should be updated to include BLOB and CLOB and we should try verify if this theory is correct with a reproduction.


        1. releaseNote.html
          2 kB
          Rick Hillegas
        2. less-gc.diff
          2 kB
          Knut Anders Hatlen
        3. derby-6096_diff2.txt
          6 kB
          Kathey Marsden
        4. releaseNote.html
          4 kB
          Kathey Marsden
        5. derby-6096_diff.txt
          6 kB
          Kathey Marsden
        6. derby-6096_code_diff.txt
          0.9 kB
          Kathey Marsden
        7. D6096.java
          0.8 kB
          Knut Anders Hatlen

          Issue Links



              • Assignee:
                kmarsden Kathey Marsden
                kmarsden Kathey Marsden
              • Votes:
                0 Vote for this issue
                7 Start watching this issue


                • Created: