Linked Questions

3 votes
2 answers
9k views

Possible Duplicate: JDBC batch insert performance I have the following method in a class: public void insertShingleSets(Vector<ShingleSet> shingleSets) { String sql = "...
user725687's user avatar
0 votes
0 answers
638 views

I have a huge set of data, and i want to insert them on database at once, i used prepared statement with batch insert but it takes around 15 seconds on pstmt.executeBatch(). I'm looking for best ...
Mazen Khalil's user avatar
2 votes
0 answers
370 views

I am working on one migration script using Java. I want to migrate data from SQL Server to Mysql. I am using the below code to migrate 1 table but the performance is very slow. It is taking approx 30 ...
learner_me's user avatar
454 votes
21 answers
515k views

I know that you can insert multiple rows at once, is there a way to update multiple rows at once (as in, in one query) in MySQL? Edit: For example I have the following Name id Col1 Col2 Row1 1 ...
Teifion's user avatar
  • 112k
39 votes
10 answers
110k views

I'm trying to find the faster way to do batch insert. I tried to insert several batches with jdbcTemplate.update(String sql), where sql was builded by StringBuilder and looks like: INSERT INTO ...
user2602807's user avatar
  • 1,292
29 votes
2 answers
23k views

The MySQL JDBC Driver defines these two properties as: useServerPrepStmts - Use server-side prepared statements if the server supports them? cachePrepStmts - Should the driver cache the ...
Vlad Mihalcea's user avatar
11 votes
1 answer
14k views

I need write about 1 million rows from Spark a DataFrame to MySQL but the insert is too slow. How can I improve it? Code below: df = sqlContext.createDataFrame(rdd, schema) df.write.jdbc(url='xx', ...
Takashi Lee's user avatar
2 votes
4 answers
15k views

so I have a software which basically downloads 1.5K game server address from my MySQL db. It then pings all of them and then upload the information such as online players back to the database. The ...
Krimson's user avatar
  • 7,739
8 votes
1 answer
5k views

Here is a way to speed up batch insert performance. Can rewriteBatchedStatements be set programatically, not via url?
Cherry's user avatar
  • 34k
14 votes
2 answers
1k views

While jdbcTemplate.batchUpdate(...) is running I can see DB row count is increased gradually(by running count(*) in the table), initially 2k then 3k and goes till 10k. 2k and 3k are not exact numbers ...
Vipin's user avatar
  • 5,283
6 votes
1 answer
5k views

I need to make a large amount of inserts, i.e. double digit millions, into an Oracle-DB using JDBC. To do so I'm using something like the following class, inspired by Efficient way to do batch INSERTS ...
abcalphabet's user avatar
  • 1,328
1 vote
1 answer
2k views

I have a spring boot application that connects to the Snowflake Database and uploads records (approx 50 columns of different data types). I am using JdbcTemplate.batchUpdate(insertSql, values, types) ...
Ish Mahajan's user avatar
0 votes
1 answer
2k views

I am trying to do a batch update for 3000 records. It takes around 15 seconds to complete, but insertion happens within 1 second. Had included rewriteBatchedStatements=true also. Do i need to do ...
Explain Down Vote's user avatar
2 votes
2 answers
905 views

Let's say I have a program where I am inserting records into MYSQL table in ddatabase in Java. Instead of inserting row by row, I insert by a batch of 1000 records. Using ExecuteBatch method, it ...
Daredevil's user avatar
  • 1,822
0 votes
1 answer
2k views

I am using preparedstatement batch update/insert to store data into database. But it is taking 3 minutes to persist 1000 entries into SQL Server Database. Am wondering if there is a way to improve the ...
dimas's user avatar
  • 2,607

15 30 50 per page