-->
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.  [ 2 posts ] 
Author Message
 Post subject: performance on binding parameter
PostPosted: Fri Apr 20, 2007 12:06 pm 
Newbie

Joined: Tue Apr 17, 2007 5:22 am
Posts: 1
Hi,
I am using Hibernate 3.0. I have bad performance on query on two of my entities/table, because the binding of parameters is long.

For a very simple mapping, and a very simple request the time for binding parameter is long.

Here is the mapping :
Code:
<hibernate-mapping>
    <class name="Event" table="Event"  >
        <id name="ideEvent" type="java.lang.Long">
            <column name="IdeEvt" precision="10" scale="0" />
            <generator class="assigned" />
        </id>
        <property name="notificationId" type="java.lang.Long">
            <column name="IdeMatisse" precision="10" scale="0" not-null="true" />
        </property>       


Here is the request :
Code:
final DetachedCriteria query = DetachedCriteria.forClass(Event.class);
            query.add( Property.forName("notificationId").eq(new Long(5723325));
            return( List<com.bnpparibas.eqd.tresoost.matisse.enterprise.entity.Event>) getHibernateTemplate().findByCriteria(query);


Here is the log
Code:
2007-04-20 18:01:49,822 DEBUG (NullableType.java:80) - binding '5723325' to parameter: 1
2007-04-20 18:02:01,118 DEBUG (AbstractBatcher.java:374) - about to open ResultSet (open ResultSets: 0, globally: 0)

Same problem in HQL with binding
With no binding (request in HQL), no problem of performance


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 5:30 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Well, what is your db? Did you check it's not the jdbc driver provided by this db that's lagging?

Maybe try the same code on a HSQL db or something like this to see if Hibernate is still long to bind parameters. If so, then maybe file an issue in the hibernate tracker, if not... Then use another db :-).

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.