title: Slow performance while writing data frame to Azure SQL database using PySpark JDBC
body: <p>I am using below <code>JDBC URL</code> in <code>PySpark</code> to write <code>data frame</code> to <code>Azure SQL Database</code>. However, I feel that the performance of this write operation is not up to the mark and can be improved by setting up a few extra properties. Are there any workarounds or any parameters that I can add so to improve the JDBC write performance?</p>
  
  <pre><code>jdbcUrl = "jdbc:sqlserver://server.database.windows.net:1433;databaseName=test;enablePrepareOnFirstPreparedStatementCall=false"
  </code></pre>
  
  <p>Below is the actual data frame write statement.</p>
  
  <pre><code>  data_frame.write \
              .mode('overwrite') \
              .format('jdbc') \
              .option('driver', jdbc_driver) \
              .option('user', user) \
              .option('password', password) \
              .option('url', jdbcUrl) \
              .option('dbtable', table + '_STG') \
              .save()
  </code></pre>