JBoss Community

update or insert taking too long...

created by harikris in Beginner's Corner - View the full discussion

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

Start a new discussion in Beginner's Corner at Community