Chapter 7. Optimizing the Data Access Layer
So far we have covered all the basic concepts of NHibernate. You have officially learnt to use NHibernate if you have followed all the previous six chapters so far. From this chapter onwards, we will talk more about "how" rather than "what". These next few chapters will concentrate on practical advice to use NHibernate in different situations. Particularly in this chapter, we will talk about optimizing your data access layer.
Though this chapter talks about optimization and mostly performance optimization (and memory optimization in some cases), do not feel inspired to go and apply these techniques/guidelines to your current project right away. Performance optimization is a relative thing. What is good performance for one project may not be good for another. Besides your use of NHibernate, performance is also driven by lot of other factors such as design of database schema, presence of proper indexes, size of the database...