Questions tagged [batch-updates]

171 questions
1
vote
1 answer

MongoDB eval function slow on 5m records update

To use the spatial functions from MongoDB I need to update the Dataset. When I run the following code over 20million documents it is still not finished after 8h. Is there a faster way to do this? db.eval(function() {…
arve
  • 133
  • 3
  • 6
1
vote
2 answers

AWS instances patch updates for multiple instances

I have about 40 linux instances running in AWS across multiple regions under VPC. Now I need to patch linux kernal, run updates for apache, php, mysql. Its quite hard to do it logging in to each servers. how to automate this process or easily run…
1
vote
1 answer

Spring JdbcTemplate batchUpdate issue always returning -3

I am trying to use the batchUpdate on Springs jdbcTemplate but all i'm getting back is an int array of -3's. Below is the code I'm running. The array list "batch" contains inserts and updates. String[] stmts = batch.toArray(new…
MDH
  • 21
  • 3
1
vote
1 answer

MySQL Batchupdate() with ON DUPLICATE KEY UPDATE

I am using batchUpdate() to insert multiple records in a table. As per the requirement, if there is a duplicate value for a primary key while inserting it should be updated with the latest received data, hence I was trying to use ON DUPLICATE KEY…
Rahul Shelke
  • 2,052
  • 4
  • 28
  • 50
1
vote
1 answer

Best way to perform insert/delete batch spring-jdbc/mysql

First, I will try to describe what I am willing to do and then, I will ask my questions. I need to do the following: List all rows corresponding to some conditions Do some tests (e.g: check if it wasn't already inserted), if test passes then insert…
aslan
  • 253
  • 1
  • 4
  • 13
1
vote
1 answer

How to track which row update failed in batch update

I'm using a try catch blocks to do a batch update using ADO.NET2.0, the UpdateBatchSize is set 500, I can often catch exceptions, but I don't know which row update failed, is there a way to get the actual failed row?
James
  • 2,570
  • 7
  • 34
  • 57
1
vote
1 answer

How can I find the values causing BatchUpdateException?

I am using Spring JDBCTemplate to perform a batchUpdate (insert) of a few thousand rows into an Oracle 10g database. To test my error handling, I made sure I get an exception about maximum length. I get the following (expected) exception: Caused…
timh
  • 96
  • 2
  • 9
1
vote
1 answer

How to insert rows dynamically from a select query to another table in java?

I have a select query (using a prepared statement) which returns a Resultset. For example the query can be : SELECT * FROM TABLE; and I want the result of this query to insert in another table, the select query is stored at database and will be…
Sami
  • 7,797
  • 18
  • 45
  • 69
0
votes
1 answer

How to bulk update in sql server 2008

i have a table which contains 10000 records, now i have added the field for placing the plaintext password, so now i want to update all the records, but should update the new field on the basis of the username... like below. update users set…
Abbas
  • 4,948
  • 31
  • 95
  • 161
0
votes
1 answer

Hibernate ManyToMany Delete

I have some trouble on deleting a content when is present a many to many relation with another object. To perform delete I have an array of named query and to delete, I loop through the array and perform delete, entity per entity, like this: private…
Davide
  • 602
  • 7
  • 18
0
votes
0 answers

NSInternalInconsistencyException when reloading collectionView although without explanation

I am encountering an NSInternalInconsistencyException when trying to reload my UICollectionView. The error message states: Invalid batch updates detected: the number of sections and/or items returned by the data source before and/or after…
0
votes
0 answers

How to rollback both database data when you are using Jdbc template with batch update if any error coming into one of your database execution query?

I have two datasource and i am using jdbctemplate batch update to update data in a batch but i am having one issue that whenever i am getting error in one of datasource in batch update than how we can rollback that inserted data from other…
0
votes
1 answer

performance issue while calling batchUpdate by java to update multiple rows on mysql 8

I met performance issue with batchUpdate for multiple rows on mysql 8 by using java. There are more than 400,000 rows in the table , I was trying to update a column by it's id. The sql is like: update table_name set status='status' where id = 1. I…
Leon
  • 3
  • 1
0
votes
0 answers

Batchupdate is freezed only for large number of rows

From my spring java code, i am trying to insert 13,500 rows into a table in oracle database through below step. NamedParameterJdbsTemplate.batchupdate(insert quert, listname. Toarray(new map(list.size()); But the process gets freeze at this step,…
0
votes
1 answer

How to set data and format in batch_update

I want to fill some cells with values in my Python script. The first would be a date value. To format this date value is my problem. (I need it because it would be a part of a diagram where I would like to display HH:MM:SS but store the original…