spark 批量插入数据到数据库中

使用批量处理的方式提升效率 connection.setAutoCommit(false) //设置手动提交 val sql = "xxxx" pstmt = connection.prepareStatement(sql) for (ele <- list){ ······ pstmt.addBatch() } pstmt.executeBatch() //执行批处理 c
相关文章
相关标签/搜索