faldeland
faldeland

Reputation: 587

Handling large data sets

Have an application that benefits greatly from FluentNHibernate/NHibernate.

Still learning FNH and NH.

A portion of the application writes summary data at the end of each event. Which over 100,000 can occur per day.

My question is, is there best practices for mapping tables of this volume of data?

I don't really want to maintain them in session if I don't need to.

Upvotes: 0

Views: 159

Answers (1)

Firo
Firo

Reputation: 30813

there is a IStatelessSession which is meant for bulk inserts. It does not maintain a session cache.

Usage:

using (var session = _sessionfactory.OpenStatelessSession())
{
    for (int i = 0; i < 100000; i++)
    {
        session.Insert(new Something());
    }
}

Upvotes: 2

Related Questions