It does seem like you've probably got some select N+1 going on here that could be cut down by some join fetching. Basically unless you have at least 1100 tables, having that many queries is probably not optimal. (Probably not even if you do have 1100 tables.) That said, if you're fine with a six second start time it shouldn't hurt anything. It sounds like it would be a PITA for debugging though...
On Tue, Jan 20, 2009 at 11:01 AM, Thomas Koch <[email protected]> wrote: > > Hi - I have a discussion with some co-workers regarding the number of > hits that NHibernate is performing against our database. > > Our setup: We are developing ASP.NET applications using NHibernate 2.0 > for the data access. > > We have a web-application containing static information stored in 7 > inter-connected classes based on 10 underlying tables. This static > information is needed all the time, thus we load all of this into > memory when the application starts. > > Using NHibernate to create and fill this object hierarchy we get 1100 > selects being sent to the database. This takes around 6 seconds to > complete. > > My co-workers feel that this is an accident waiting to happed, whereas > I myself consider this less of problem - after all we only do this > once on application start-up. > > What do you think? Is 1100 select statements on application start > something to be afraid of? > > Any opinion/advice is appreciated. > > Regards > Thomas > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
