Discussion:
[jboss-user] [Beginner's Corner] - update or insert taking too long...
harikris
2013-03-11 02:58:04 UTC
Permalink
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]
Loading...