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>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to