Why do you want to load so many records at once?
Why do you want to use NHibernate instead of plane old sql?

On Thu, Aug 6, 2009 at 3:29 PM, cyril grauffel<[email protected]> wrote:
> Hi all !
> I have a probleme to load a huge amount of records (about 100 000) to a
> collection.
> The query is fast but the loading is slow !
> The query itself, in firebirdSql, takes about 5 seconds. With Nhibernate,
> the load takes about 45 seconds !
> Here is an extract of my log
>
> 2009-07-31 16:24:30,596 [4] DEBUG NHibernate.Impl.BatcherImpl - Opened new
> IDbCommand, open IDbCommands: 1
> 2009-07-31 16:24:30,596 [4] DEBUG NHibernate.Impl.BatcherImpl - Building an
> IDbCommand object for the SqlString: "Here is mys query, too long to display
> it"
> 2009-07-31 16:24:30,596 [4] DEBUG NHibernate.Loader.Loader -
> BindNamedParameters() 3394 -> id0_ [0]
> 2009-07-31 16:24:30,596 [4] INFO  NHibernate.Loader.Loader - "Here is mys
> query, too long to display it"
> 2009-07-31 16:24:30,596 [4] DEBUG NHibernate.SQL -  "here is my query, too
> long to display it"
> 2009-07-31 16:24:30,596 [4] DEBUG NHibernate.Impl.BatcherImpl - Opened
> IDataReader, open IDataReaders: 1
> 2009-07-31 16:24:30,596 [4] DEBUG NHibernate.Loader.Loader - processing
> result set
> 2009-07-31 16:24:30,611 [4] DEBUG NHibernate.Loader.Loader - result set row:
> 0
> 2009-07-31 16:24:30,611 [4] DEBUG NHibernate.Loader.Loader - result row:
> CACAO_Framework.Carton, 23242112
> 2009-07-31 16:24:30,611 [4] DEBUG NHibernate.Loader.Loader - Initializing
> object from DataReader: [CACAO_Framework.Carton#CACAO_
> Framework.Carton]
> 2009-07-31 16:24:30,611 [4] DEBUG NHibernate.Loader.Loader - Hydrating
> entity: CACAO_Framework.Carton#CACAO_Framework.Carton
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - Initializing
> object from DataReader: [CACAO_Framework.UniteArchive#23242112]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - Hydrating
> entity: CACAO_Framework.UniteArchive#23242112
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - found row of
> collection: [CACAO_Framework.Carton.Inventaire#CACAO_Framework.Carton]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - new
> collection: instantiating
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - loading
> [UniteArchive#23242112]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - attempting
> to resolve [UniteArchive#23242112]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - resolved
> object in session cache [CACAO_Framework.UniteArchive#23242112]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - result set row:
> 1
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - result row:
> CACAO_Framework.Carton, 23242113
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - Initializing
> object from DataReader: [CACAO_Framework.UniteArchive#23242113]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - Hydrating
> entity: CACAO_Framework.UniteArchive#23242113
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Loader.Loader - found row of
> collection: [CACAO_Framework.Carton.Inventaire#CACAO_Framework.Carton]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - reading row
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - loading
> [UniteArchive#23242113]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - attempting
> to resolve [UniteArchive#23242113]
> 2009-07-31 16:24:30,627 [4] DEBUG NHibernate.Impl.SessionImpl - resolved
> object in session cache [CACAO_Framework.UniteArchive#23242113]
>
> ...and this log continues to the end of my 100 000 records.
> Of course, I tried to disable logs, and it's slow too.
>
> What can I do to improve the loading performances ?
>
> --
> Cordialement,
>
> Cyril GRAUFFEL
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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