-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: performance problem, upgrade to 2.11
PostPosted: Fri Jan 09, 2004 7:06 am 
Newbie

Joined: Wed Jan 07, 2004 6:13 am
Posts: 13
hi, no peopole would answer my question :(, mabye i didn't show the detail.

now, i show the detail code , hope to get some advice.
There are not more than 100 records in the db2 8.1.
I also find it spend more time to save a object at 2.11.

for (int i = 0; i < arg.length; i++) {
daoSupport.queryList("user.findby.name",
new Object[] {arg[i] });
}



public List queryList(String queryName, Object[] args)
throws DAOException {
Tools.argumentCheck(queryName, "query name");

Session session = null;

try {
session = openSession();

Query query = session.getNamedQuery(queryName);
setParameter(query, args);

return query.list();
} catch (HibernateException e) {
handelException("During query", e);
} finally {
releaseSession(session);
}

return null;
}

the length of arg array is 100, and only the query can get some records.

2.11 20*1000ms
2.03 500 ms

i modify the argument array, let every time can got the same record . the below is result.
2.11 20*1000ms
2.03 5000 ms

what happen? i aslo find it spent more time to save a object if i use the transaction.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2004 9:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
2.1 dropped support for a prepared statement cache for internal database pool. If you are using the hibernate pool then setup one of the other database pools (such as C3PO) and try it again.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 10, 2004 1:39 pm 
Newbie

Joined: Wed Jan 07, 2004 6:13 am
Posts: 13
david wrote:
2.1 dropped support for a prepared statement cache for internal database pool. If you are using the hibernate pool then setup one of the other database pools (such as C3PO) and try it again.


thx ,david, I have find this change at changelog of 2.10 beta4.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.