Diego, I did provide some code, code that I thought was relevant. I could however create some demo code for you if that will help. That said, the case is really simple. Given the session factory provided in my first post I compared the same query, session.CreateCriteria<ApprovedClaim>().List() with both stateless and statefull sessions. It is in fact a simple select * from approvedclaim query which is relatively fast.
Fabio, Are you talking about MultiCriteria? If so, that shouldn't be really relevant for our case because we issue one simple query that returns a bunch of results It looks as if the deserialization of the stateless session is different and slower (by 30-50%). That said, we've seen this problem all over our code. Queries that are run on stateless sessions are up to 30-50% slower that the counterpart, so it isn't related to just one query. That leads me to think that either we've configured NHibernate wrong, or the stateless deserialization is different. On 7 Jul, 00:21, Fabio Maulo <[email protected]> wrote: > have a look to the batcher ;) > > > > > > On Tue, Jul 6, 2010 at 1:05 PM, Henning <[email protected]> wrote: > > I tried using NH Prof but with no luck. I couldn't get any clear > > answer as to why stateless sessions are slower. > > > In fact, you'd think that stateless sessions would be much faster > > since NHibernate doesn't track them. Means less overhead and faster > > code. > > > Henning > > > On 6 Jul, 02:51, Diego Mijelshon <[email protected]> wrote: > > > Only a profiler can tell you where/how the time is being spent > > differently. > > > No psychics here. > > > > Diego > > > > On Mon, Jul 5, 2010 at 07:41, Henning <[email protected]> wrote: > > > > The query looks like this > > > > session.CreateCriteria<ApprovedClaim>().List(); > > > > > i.e, nothing advanced. > > > > > Does anybody know why this is happening? > > > > > Henning > > > > > On 5 Jul, 12:40, Henning <[email protected]> wrote: > > > > > Hi > > > > > > We've noticed that when doing bulk loads with stateless session, our > > > > > performance actually goes down when I'd expect it to go up. (I know > > > > > nhibernate is not made for bulk loads). > > > > > > Our sessionfactory setup looks like this, > > > > > > var factory = Fluently.Configure() > > > .Database(MsSqlConfiguration.MsSql2008.ConnectionString(Config.ConnectionString)) > > > > > .ExposeConfiguration(c => > > > > > { > > > > > c.SetProperty("current_session_context_class", > > > > > "call"); > > > > > c.SetProperty("adonet.batch_size", "1"); > > > > > c.EventListeners.PreInsertEventListeners = new > > > > > IPreInsertEventListener[] { new EntitySaveEventListener() }; > > > > > c.EventListeners.PreUpdateEventListeners = new > > > > > IPreUpdateEventListener[] { new EntitySaveEventListener() }; > > > > > c.Interceptor = new Interceptor(); > > > > > }) > > > > > .Mappings(m => > > > > > m.FluentMappings.AddFromAssemblyOf<CompanyMap>()) > > > > > .BuildSessionFactory(); > > > > > > return factory; > > > > > -- > > > > 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]<nhusers%[email protected]> > > <nhusers%[email protected]<nhusers%252bunsubscr...@googlegroups.com> > > > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/nhusers?hl=en. > > > -- > > 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]<nhusers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. > > -- > Fabio Maulo -- 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.
