[jboss-user] [Beginner's Corner] - update or insert taking too long...

harikris do-not-reply at jboss.com
Sun Mar 10 22:58:04 EDT 2013


harikris [https://community.jboss.org/people/harikris] created the discussion

"update or insert taking too long..."

To view the discussion, visit: https://community.jboss.org/message/801789#801789

--------------------------------------------------------------
Hi All,

My setup is: JBOSS AS 7.1.1 and PostGreSql

When there are no or very less (a couple of hundred) records in the table, my inserts/updates completes very fast.
But when the number of records get to a couple of thousand, the inserts or updates take an extremely long time. For ex: inserting a record takes more than 1 or 2 seconds.

Not sure where the problem is or where to start.

My code to update the database looks like this -

public long updateRecord(long id, List<MyData> myDataList) {
       Event eventFromDB = findById(id).get(0);
for(MyData myData : myDataList) {
                                        eventFromDB.getMyData().add(myData);
                         }
em.merge(eventFromDB);
return 1L;
          }

I am a newbie and have set up the jboss as to the best of my knowledge.

I haven't done any configuration settings on either the JBOSS AS or the PostGreSQL.

The JBOSS AS is running in the standalone mode using the standalone-full.xml config file.

Thanks in advance.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801789#801789]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130310/336f92d4/attachment.html 


More information about the jboss-user mailing list