Why not use a stateless session instead 
(sessionFactory.OpenStatelessSession()) and do all your queries for 
reporting with it?
This way, entities will not be kept in memory and no need to Clear() the 
session.

RP

On Tuesday, September 9, 2014 11:52:04 AM UTC+1, Marius Schröder wrote:
>
> Hello, 
>
> I have a big performance issue in our program.
>
> Simplified: I have many tables in a database.
>
> Now I create some new tables from these data (Create Reportings).
>
> If I load the data (many datas) from the database for the reportings, I 
> have a big cache, and it takes a long time > 1h to generate these 
> reportings... The memory consumption of the generation is also very high.
>
> If I place some "Session.Clear" into the program, after the loadings, the 
> time for the generation is a lot faster. Also the memory is smaller.
>
> *Normal*
>
> Time average: 1h 23min
> Memory average: 230 MB
>
> *After the Change (Session.Clear)*
>
> Time average: 0h 25min
> Memory average: 171 MB
>
> I compared the data in the database and they are the same.
>
>
> I hope you understand the problem, and you can help me, why there is such 
> a big difference.
>
> Best Regards,
>
> M. Schröder
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to