insert « Performance « JPA Q&A





1. high performance hibernate insert    stackoverflow.com

I am working on a latency sensitive part of an application, basically i will receive a network event transform the data and then insert all the data into the DB. After ...

2. How to optimize performance on big inserts    forum.hibernate.org

Newbie Joined: Mon May 11, 2009 11:16 am Posts: 13 Hi to all, i've a question regarding performance optimizations on big objects. We've a model where a person can have a list of AttributeValues (both are entities, clearly). Furthermore we save a ActionItem object to be able to trace changes. This means in summary that when i want to persist one ...

3. insert performance    forum.hibernate.org

hi! i'm using hibernate (JDK 1.4.2) with sapdb (7.4 the latest stable) when i want to use hibernate for an import program then hand coded sql seems to be more than twice(!) faster than hibernate. each object to insert is just a plain object with three attributes: long (as id) String Timestamp here the code sniplet for the insert: for (each ...

4. Performance with inserts    forum.hibernate.org

Hi, I tried to compare JDBC versus Hibernate using the performance test framework provided by the OJB project : ( http://db.apache.org/ojb/performance.html#OtherTools ). I wrote HibernatePerfTest and HibernatePerfHandle classes, and changed a bit the JDBCPerfTest/Handle classes provided. I changed the following things in the JDBC classes : * isolate this class from any OJB Broker or Identity class * use the auto-increment ...

5. Hibernate insert performance    forum.hibernate.org

Author Message marceltoma Post subject: Hibernate insert performance Posted: Wed Aug 25, 2004 3:10 pm Beginner Joined: Fri Apr 16, 2004 10:25 am Posts: 44 Location: Brazil I have to insert 750000 registers in the DB, but when I start inserting the data, it gets more and more slow, what can I do to optimize inserts in hibernate? Hibernate ...

6. Does creating polymorphc classes benefit INSERT performance?    forum.hibernate.org

In my application, I have to create 100's of Shipment objects upon request since the user can create sequences of Shipments before they are individual entered into the system. This is to help facilitate customs tracking in advance. However, when I create these new Shipment objects, I only need to set a few properties (the rest can be null). Considering the ...

7. Performance of Mass Creation (10'000 INSERT)    forum.hibernate.org

Hello, I've got a BIG problem :-) I need to export 10,000-100'000 objects into my database. I use Hibernate everywhere in my application and I would like to keep using it. DB is SQL Server 2000 with nvarchar... I do something like that : for (Iterator iter ...... ) { MyObject obj = new MyObject(); obj.setXXX(.....) ... hibernate.save(obj); if (count++ % ...

8. High Performance Inserts    forum.hibernate.org

Hi, I'am looking for a fast solution to insert many incoming data-pakets in a MySQL database. I'am using Hibernate 3.1.3 and MySQL 5.0.18. The destination table contains 5 columns with type DOUBLE and a ID column BIGINT with auto-increment. In my application I use Hibernate for the other database operations, so I like to use it for this problem too. Now ...

9. JDBC vs Hibernate insert performance    forum.hibernate.org

I have found that you can comfortably use JDBC alongside Hibernate. Also see the docs on Session's createSQLQuery() method and the Query class. It is probably better to use those than 'raw' JDBC. Our unit tests have sometimes shown that updates can conflict with items that are already loaded into the session cache. To overcome this you can clear or evict ...





10. Performance Suggestions for Massive Inserts?    forum.hibernate.org

Author Message objec Post subject: Performance Suggestions for Massive Inserts? Posted: Fri Jan 05, 2007 6:01 pm Beginner Joined: Mon Nov 22, 2004 8:53 pm Posts: 23 I have a use case whereby I need to insert a 10 million records into a single (wide) table at one time each month [I can't change the schema]. Hibernate is perfect ...

11. Performance of Update versus new insert    forum.hibernate.org

I am experiencing a problem trying to update an object that contains a large collection of Doubles: Code: @Entity public class Container { @CollectionOfElements(fetch = FetchType.LAZY) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @Cascade(value = CascadeType.EVICT) private List elements; } When I initially save this object with the elements collection initialized, the save operation takes a short amount of time. However, if I perform the ...

12. "Performance problem" on insert/update    forum.hibernate.org

Author Message nightowl Post subject: "Performance problem" on insert/update Posted: Tue Jan 29, 2008 1:37 pm Newbie Joined: Tue Jan 29, 2008 12:48 pm Posts: 2 Hello everybody, i have a "Performance problem" on insert/update in Hibernate, because Hibernate issues the query (see bottom) in Oracle. I have analyzed it and found the hibernate select the whole Business Object ...

13. why many-to-one only performance insert but not update ?    forum.hibernate.org

public class User { private Address address; //setter and getter.. }

14. Slow Insert Performance    forum.hibernate.org

Dear Hibernate community, I want to insert a lot if of objects of the class "Characteristic" which has a manytoone relationship to "CharacteristicDefinitionType", but I'm having performance problems: this.session.beginTransaction(); for (Map row : table.getData()) { CharacteristicDefinitionType cdt = session.createQuery("from CharacteristicDefinitionType where and name = ?").setString(0, row.get("DEFTP")).uniqueResult(); Characteristic characterstic = new Characteristic(); characterstic.setSapId(row.get("ELTUID")); characterstic.setDefType(cdt); characterstic.setName(row.get("MAPNAME")); this.session.save(characterstic); } this.session.getTransaction().commit(); As you can ...