Hi to the Hibernate Community,
i am currently researching the NHibernate 2 in order to develop a new datalayer for our application.
A special demand is to get about 150k datarows from a simple table in an Oracle Database (10gR2) as fast as possible. The table isnt associated with other ones... just a simple table.
At current configuration it takes about 22sec to get this List of Objects. My first thought was to change the fetchsize for the session to get a faster result.
Unfortunetly i didnt find the ISession.SetFetchSize(..) as it is declared in the Hibernate 3 API for Java.
If it helps, here my hibernate.cfg.xml:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<!-- -->
<session-factory name="nhibernator">
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
<property name="connection.connection_string">persist security info=True;data source=SOURCE; user id=ID; password=PWD;</property>
<property name="show_sql">true</property>
<property name="prepare_sql">false</property>
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
<property name="use_outer_join">false</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider</property>
<mapping assembly="BOMPrins" />
</session-factory>
</hibernate-configuration>
I´ve found several options for the batch-size to configure in the hibernate.cfg.xml or the mapping file for the entitty but nothing could gain some speed :(
Additionaly i´ve read that i could use
Code:
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
instead of
Code:
<property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
but NHibernate tells me that it cannot instantiate the driver class from this configuration. Ive installed the latest ODP.
You musst understand: I HAVE to speed it up, because the whole develop-team in my company worked with MS DataSets and Borland DataTables in the past and they are very critical in point of ORMs :) I dont think, that i´ll get the same speed they had in past, but i want to get i bit closer to their 12secs ;)
The NHibernate Reference and Google dont help me anymore, so i am turnig to this forum.
Can anyone give me some advice to tune up this execution?
With best regards
Adam