Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 15-M0
    • Fix Version/s: 15-M0
    • Component/s: jdbc
    • Labels:
      None
    • Environment:

      Any database

      Description

      I'm using geogig to import/export data from/to Oracle. As I was a bit surprised by the slowness of the export operation, I've looked a bit at how it's done.

      Basically, in JDBCDataStore#insert, Geotools loops over the features to insert and, for every feature, will do that:

      • Do a "select max(key)+1 from table" to get the next value to use
      • Create a PreparedStatement with bound variables
      • execute it
      • close the PreparedStatement

      That is very inefficient.
      When doing a lot of inserts in JDBC, one should use addBatch and executeBatch.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pvalsecc Patrick Valsecchi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 week
                  1w
                  Remaining:
                  Remaining Estimate - 1 week
                  1w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified