NHibernate + Oracle: speed problems when querying data -


we have wcf application uses nhibernate query data database. after installing application new test environment we're facing performance problems queries. our old , new environment use different oracle-servers both of databases have same data.

we have went through our nhibernate logs , identified problematic part:

2010-12-02 07:14:22,673 nhibernate.sql                 - select this_.cc... 2010-12-02 07:14:22,688 nhibernate.loader.loader       - processing result set 2010-12-02 07:14:27,235 nhibernate.loader.loader       - result set row: 0 

in case query returned 1 row. seems in our new environment "processing result set" taking longer (5 seconds vs 0.5 seconds) in our other environment. there way find out inside "processing result set" taking long?

note. executing same exact query directly db toad doesn't reproduce problem. with toad, both database server equally fast.

we using detachedcriteria create query , executed this:

        dim criteria icriteria = crit.getexecutablecriteria(getsession())         return new generic.list(of t)(criteria.list(of t)) 

the version of nhibernate 2.1.2.4 , we're using activerecord 2.1.0 create mappings. oracle servers of version 10g.

so in our case have 2 environments have same version of application identical configuration files , querying against identical databases, have different application , oracle servers. in 1 environment querying through nhibernate takes around 5.5 seconds , in 0.5 seconds. results consistent , same query has been executed around 50 times both environments.

is there in oracle configuration cause misbehave nhiberate? , there way more detailed logging out nhibernate exact problem inside "processing result set" found?

any advice appreciated.

we able fix our problem switching database drivers microsoft's oracle's odp.net. now, both servers equally fast , our fast server executes queries more rapidly. don't know setting in our new server made microsoft's oracle driver slow.

and seems microsoft nowadays recommending use else own oracle-drivers. http://blogs.msdn.com/b/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -