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

Cache default calendar in result sets and statements on client driver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 10.6.1.0
    • None
    • JDBC, Network Client
    • Normal
    • Newcomer
    • Performance

    Description

      After the changes in DERBY-4582, these methods now allocate a default calendar object on each invocation (on the client driver), whereas they didn't before the fix:

      ResultSet.getDate(int)
      ResultSet.getTime(int)
      ResultSet.getTimestamp(int)

      PreparedStatement.setDate(int, java.sql.Date)
      PreparedStatement.setTime(int, java.sql.Time)
      PreparedStatement.setTimestamp(int, java.sql.Timestamp)

      CallableStatement.getDate(int)
      CallableStatement.getTime(int)
      CallableStatement.getTimestamp(int)

      The embedded driver prevents excessive allocation of default calendar objects in these methods by caching an instance in ConnectionChild (the super-class of EmbedResultSet, EmbedPreparedStatement and EmbedCallableStatement). We should do something similar on the client driver.

      Attachments

        1. Main.java
          7 kB
          Knut Anders Hatlen
        2. Main.java
          6 kB
          Jayaram Subramanian

        Issue Links

          Activity

            People

              rsjay1976 Jayaram Subramanian
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: