-->
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.  [ 1 post ] 
Author Message
 Post subject: NHibernate takes more than 500x time to query compared to DB
PostPosted: Fri Jul 08, 2011 12:08 pm 
Newbie

Joined: Tue Jul 05, 2011 11:57 am
Posts: 2
I checked the following query using nhProfiler. It takes about 6 ms for the DB and 3000ms+ for nHiberbate.

SELECT ID,RUIN,RUI,RXCUI1N,RXCUI2N,RXAUI1N,RXAUI2N,RXCUI1,RXCUI2,RXAUI1,RXAUI2, STYPE1,STYPE2 ,REL,RELA,DIR ,SUPPRESS
FROM RXNREL WHERE (RXCUI1N in (369039) or RXAUI1N in (2059926))and RELA = 'dose_form_of' .

I am not aware of what may be going wrong.

The mapping is as below:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="TypeModel"
assembly="QAP">

<!-- Mappings for class 'MedRel' -->
<class name="MedRel" table="RXNREL" lazy="false">
<cache usage="read-only"/>
<!-- Identity mapping -->
<id name="ID" type="long">
<column name="ID" />
</id>

<property name="RUID" type="long" column="RUIN" />
<property name="RUIDString" type="string" column="RUI" />
<property name="SourceMedID" type="long" column="RXCUI1N" />
<property name="DestMedID" type="long" column="RXCUI2N" />
<property name="SourceMedAtomID" type="long" column="RXAUI1N" />
<property name="DestMedAtomID" type="long" column="RXAUI2N" />
<property name="SourceMedIDString" type="string" column="RXCUI1" />
<property name="DestMedIDString" type="string" column="RXCUI2" />
<property name="SourceMedAtomIDString" type="string" column="RXAUI1" />
<property name="DestMedAtomIDString" type="string" column="RXAUI2" />
<property name="SourceMedIDType" type="string" column="STYPE1" access="field.camelcase-underscore" />
<property name="DestMedIDType" type="string" column="STYPE2" access="field.camelcase-underscore" />
<property name="RelationshipType" type="string" column="REL" />
<property name="RelationshipName" type="string" column="RELA" />
<property name="Direction" type="string" column="DIR" />
<property name="Suppressed" type="string" column="SUPPRESS" access="field.camelcase-underscore" />

</class>
</hibernate-mapping>


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

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.