1. Derby
  2. DERBY-1879

Save meta data related information for an EmbedResultSet at the plan level instead of the ResultSet level improves performance.


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s:
    • Component/s: JDBC
    • Labels:
    • Bug behavior facts:


      EmbedResultSet creates and holds references to information that logically is at the plan level, the same for all ResultSet's that use the same prepared plan. Holding this information at the EmbedResultSet hurts performance and memory usage as ResultSet objects are short lived.

      Saving the ResultSetMetaData object in the ResultDescription object means a single creation for the lifetime of the plan (shared across connections), rather than once per ResultSet object as needed.

      Saving the column name to position mapping added in DERBY-1862 in the ResultDescription has a similar benefit, the map is set up once per prepared plan, not once per executeQuery().

      With test changes (will attach patch soon), the performance of the derby1862 test in DERBY-1876 improves by around 15%

      1. derby1879_diff.txt
        19 kB
        Daniel John Debrunner

        Issue Links


          Daniel John Debrunner created issue -
          Daniel John Debrunner made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-1876 [ DERBY-1876 ]
          Daniel John Debrunner made changes -
          Attachment derby1879_diff.txt [ 12341833 ]
          Daniel John Debrunner made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Fix Version/s [ 12310800 ]
          Daniel John Debrunner made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Dag H. Wanvik made changes -
          Component/s Performance [ 11709 ]
          Dag H. Wanvik made changes -
          Derby Categories [Performance]
          Gavin made changes -
          Workflow jira [ 12384306 ] Default workflow, editable Closed status [ 12799259 ]


            • Assignee:
              Daniel John Debrunner
              Daniel John Debrunner
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: