openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kuuldor <kuul...@gmail.com>
Subject Re: Weird Performance Problem
Date Tue, 22 Jan 2008 14:37:59 GMT
Yes. I think it will be reasonable because in the real environment
each inserting may be arosed by different client and be in one
transaction.

2008/1/22, Pinaki Poddar <ppoddar@apache.org>:
>
> Are you are beginning/committing 1000 transactions to insert 1000 instances?
>
>
> Chengdong Lu wrote:
> >
> >
> > My test is to insert 1000 records into the table. The test code is like
> > this:
> >  private static void insertJPA() throws DAOException, SQLException {
> >   DAOFactory daoF = new DAOFactory();
> >   AccountDao accountDao = daoF.getAccountDao();
> >   System.out.println(new java.util.Date().toString());
> >
> >   for (int i = 0; i<1000; i++)
> >   {
> >
> >    TransactionProxy tran = accountDao.beginTransaction();
> >    Account newuser = new Account();
> >    newuser.setName("user" + i);
> >    //newuser.setFullname("User No. " + i);
> >    //newuser.setDescript("Common user");
> >    accountDao.insert(newuser);
> >    accountDao.commitTransaction(tran);
> >   }
> >  }
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Weird-Performance-Problem-tp14998594p15003474.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

Mime
View raw message