Getting ExecuteBatch to execute faster

后端 未结 4 1565
刺人心
刺人心 2020-12-18 08:24

I\'m trying to read a table from a sybase server, process the rows, and output the results to another table. (Below is my code)

The code retrieves the table pretty

4条回答
  •  被撕碎了的回忆
    2020-12-18 08:54

    Add ?rewriteBatchedStatements=true to the end of your JDBC url. It'll give you a serious performance improvement. Note that this is specific to MySql, won't have any effect with any other JDBC drivers.

    Eg : jdbc:mysql://server:3306/db_name?rewriteBatchedStatements=true

    It improved my performance by more than 15 times

提交回复
热议问题