Questions tagged [bulkupdate]

Bulk update a database

Methods to bulk update a database with single or multiple columns of data. This could be either unique data for each row or same data for a column.

299 questions
3
votes
1 answer

How to do bulkcreate with updateOnDuplicate when there are composite keys?

I'm using Postgres/sequelize . I need to do bulkupdate and the table is partitioned , so I can't use "Insert into ~ on conflict" . It looks like I can use bulkCreate with 'updateOnDuplicate' option but I don't know how to define multiple keys. I…
jetulis
  • 168
  • 1
  • 13
3
votes
1 answer

With Dexie, how to update multiple objects with a non-primary index?

I want to do something like, myTable.update({ location: 'Paris'}, { location: '' } and have all the objects in myTable that have a location of 'Paris' get changed to have location set to empty string. location is not a primary key, so there may be…
David Burson
  • 2,947
  • 7
  • 32
  • 55
3
votes
1 answer

Update query execute very slow on mysql when more than 1 million records

Query is taking more than one hour. Anyone can help with this? thanks in advance. My query is UPDATE coupons SET expiration_date='2020-06-06' My table structure…
WebCode Genie
  • 31
  • 1
  • 2
3
votes
1 answer

Bulk Update in SQL Server from C#

I have to update multiple records in SQL Server table from C#. Below are the steps I have to follow and below is the code. The code is working but the process is taking much longer than expected. I need a quick way to update 10000 records, not sure…
Lavin
  • 45
  • 1
  • 5
3
votes
1 answer

Strange behaviour of BULK COLLECT

I tinkered together the following PL/SQL BULK-COLLECT which works astonishingly fast for updates on huge tables (>50.000.000). The only problem is, that it does not perform the updates of the remaining < 5000 rows per table. 5000 is the given limit…
royskatt
  • 1,190
  • 2
  • 15
  • 35
3
votes
1 answer

Spring, MongoDB and upserts: works with one-by-one updates, fails with bulk updates

In my test code I first perform a regular upsert using MongoTemplate.upsert(). It correctly adds data to the DB, and the following document appears in the db, just as expected: { "_id" : 1, "elements" : [ { "payload" : "payload" } ] } I then…
infthi
  • 537
  • 1
  • 5
  • 19
3
votes
1 answer

MongoDB bulk update efficiency using forEach

How would you approach bulk / batch updating documents (Up to 10k docs) coupled with forEach? (No specific criteria to update by, used for random document selection) I'm looking at two options: Collect all document _id in the forEach closure into…
natanavra
  • 2,100
  • 3
  • 18
  • 24
3
votes
1 answer

Bulk update through MarkLogic 8 Patch functionality

Using ML8's Patch functionality I was able to update a document by providing its URI. But if patch is needed on multiple documents, say a new child needs to be added to all XML/JSON documents in a collection, can we do that in ML8 !
Ankit Goel
  • 173
  • 7
3
votes
3 answers

Bulk Update Database

I've been looking on this site for a while but have not found the answer. I am trying to do a bulk update on data that I know is already in the table. I have one column that needs to be set when a certain condition comes back for the row ID. Here…
JPM
  • 9,077
  • 13
  • 78
  • 137
2
votes
0 answers

Bulk Upsert in Couchbase with using Golang

I'm new to Golang Please help with understanding I want to use bulk upsert operation via gocb.collection_bulk.go. How does it work if at the time of replacing the document, it will be blocked Is this operation responsible for the moment of blocking…
oliaaa_s
  • 59
  • 5
2
votes
1 answer

How can I speed up updating MySQL

How can I speed up updating data in my database? Do I need to change the loop or build the update in a different way? try: g = 1 for i in gate_io().values.tolist(): with connection.cursor() as cursor: if i[1] != 0 and…
2
votes
1 answer

MS SQL log size is not enough or "the transaction log for database is full due to 'active_transaction'."

I am trying to update the table with a result from select query. The problem is that query takes too long and i get an error that log file is not enough. For example: With cte as ( select t1.key, t1.col1, t2.col2, t3.col3 from t1 left join t2 on…
2
votes
2 answers

Bulk Editing Specific Elements in an XML with C#

I have an .xml file that shares an attribute between two different elements. I am trying to multiply the attributes inside one elements with one variable, and multiply the attributes in the other element with a different variable. …
Darkye
  • 23
  • 3
2
votes
2 answers

'dict' object has not attribute 'pk' when using Django bulk_update()

I have the following code: obj = Products.objects.filter(dump__product_name = 'ABC, dump__product_color = 'black').values() new_price = [100, 200, 300] for item in range(len(obj)): obj[item]['price'] -=…
Shiny
  • 115
  • 1
  • 9
2
votes
1 answer

PostgreSQL: 42883: operator does not exist: information_schema.sql_identifier + unknown

.NET Core 2.2 application with Npgsql EF Core 2.2.4, Npgsql Nodatime 2.2.4 I'm trying to bulk update records and Entity Framework is throwing an exception 42883: operator does not exist: information_schema.sql_identifier + unknown If I don't use…
BigUuice
  • 21
  • 7
1
2
3
19 20