Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-17536

Minor performance improvement to JDBC batch inserts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • SQL

    Description

      JDBC batch inserts currently are set to repeatedly retrieve the number of fields inside the row iterator:

      https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala#L598

      val numFields = rddSchema.fields.length

      This value does not change and can be set prior to the loop.

      Attachments

        Activity

          People

            blue666man John Muller
            blue666man John Muller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified