batch-insert Questions

6

What is the most efficient way of inserting multiple rows in cassandra column family. Is it possible to do this in a single call. Right now my approach is to addinsert multiple column and then exe...
Signboard asked 26/7, 2013 at 15:22

4

Technology stack: Oracle database 11.2.0.2, Java 1.6, Hibernate 3.6.6.Final. I am new to hibernate, apologize if this is trivial. The following code was supposed to put some optimization: Transa...
Laurentium asked 2/2, 2017 at 12:25

6

Solved

New to Spring, I am trying to insert a List<Map<String, Object>> into a table. Until now I have been using the SqlParameterSource for batch update, which works fine when a java bean is ...
Exanimate asked 2/7, 2013 at 10:1

7

Solved

I want to insert multiple rows into a MySQL table at once using Java. The number of rows is dynamic. In the past I was doing... for (String element : array) { myStatement.setString(1, element[0])...
Corposant asked 4/12, 2010 at 18:20

4

Solved

I want to implement a sql query using CodeIgniter Active Record class. The query looks like this.. INSERT california_authors (au_id, au_lname, au_fname) SELECT au_id, au_lname, au_fname FROM autho...
Frig asked 29/7, 2010 at 8:29

2

Solved

I get Arraylist of object of say 1000 elements and i want to create batch of 100. How to do it in java 8 in some elegant way? I have following entity to iterate upon which has size of 1000: List...
Register asked 29/11, 2019 at 4:40

3

I need to do a massive insert using EJB 3, Hibernate, Spring Data and Oracle. Originally, I am using Spring Data and code is below: talaoAITDAO.save(taloes); Where talaoAITDAO is a Spring Data J...
Photoconductivity asked 29/11, 2013 at 12:1

1

I would like to perform a batch upsert with JPA and Postgres. I can't use merge as I am checking conflict on a Unique Constraint which is not PK. I found that to upsert in postgres we can now use t...
Shira asked 25/11, 2015 at 6:46

1

Is there any way to get the values of affected rows using returning clause in JAVA while using JDBC Batch Insert statement? I am able to get the required values of a single row affected.But not for...
Menfolk asked 23/6, 2014 at 5:8

3

Can some one explain me how hibernate.jdbc.batch_size = 1000 and if (i % 100 == 0 && i > 0) { session.flush(); session.clear(); } together works?
Madelyn asked 14/8, 2017 at 8:42

4

Solved

I am trying to insert 100,000 rows in a MYSQL table under 5 seconds using Hibernate(JPA). I have tried every trick hibernate offers and still can not do better than 35 seconds. 1st optimisation :...
Backup asked 29/5, 2017 at 13:24

1

I am using a API's with lot's of calculation almost 100 database fields at the end with a big Foreach loop. In every iteration i insert data in database. I want to insert data in once at the end ...
Truant asked 26/1, 2017 at 10:20

4

Solved

I am trying to insert 1,500,000 records into a table. Am facing table lock issues during the insertion. So I came up with the below batch insert. DECLARE @BatchSize INT = 50000 WHILE 1 = 1 BEGI...
Deoxygenate asked 9/9, 2016 at 6:9

5

Solved

I have some monthly weather data that I want to insert into an Oracle database table but I want to insert the corresponding records in a batch in order to be more efficient. Can anyone advise as to...
Busboy asked 15/2, 2013 at 21:58

5

Solved

I have a query where I need to "batch" insert rows into a table with a primary key without identity. --TableA --PK int (Primary key, no-identity) --CustNo int INSERT INTO TableA (PK,CustNo) SELEC...
Beecher asked 8/8, 2011 at 15:42

1

Solved

Is it possible to insert multiple rows in one query with Yii's ActiveRecord? Or is this only possible via the lower-level DAO objects? I have two models 1- Transaction 2-TransactionItems Ther...
Extranuclear asked 8/12, 2014 at 9:47

5

Does JPA/EJB3 framework provide standard way to do batch insert operation...? We use hibernate for persistence framework, So I can fall back to Hibernate Session and use combination session.save()/...
Sinegold asked 15/1, 2009 at 19:45

2

Solved

I am inserting many records using JDBC batch inserts. Is there any way to get the generated key for each record? Can I use ps.getGeneratedKeys() with batch inserts? I am using oracle.jdbc.OracleD...
Edson asked 28/3, 2013 at 14:22

3

Solved

I am fresh to Codeigniter. I have a form which looks something like this. <tr> <td><input type="text" name="Name[0]" value=""></td> <td><input type="text" name="A...
Chummy asked 3/10, 2010 at 10:38

1

Solved

Can anyone tell me what I'm doing wrong I'm executing 350 inserts in a mysql and it's taking like 40 secs. Here is the code long t0 = System.currentTimeMillis(); Connection con = connectionProvi...
Earwig asked 22/11, 2012 at 1:11
1

© 2022 - 2024 — McMap. All rights reserved.