Organization of the chapter

This chapter is organized as a series of features, techniques, guidelines, gotchas, and so on. These do not appear in any particular order. Most of these are useful when dealing with performance tuning, but some are useful when dealing with issues such as memory consumption and other nasty issues you may face. I have not specifically put them into different categories. My aim is not to steer you towards performance tuning but to make sure you know these techniques and are able to use them when needed.

Note

The techniques/features that are presented here are most basic that you will find on this topic. As your experience with NHibernate grows and you become more expert you will figure out that there are several avenues for optimization that are applicable to very specific situations. It is not in the scope of this book to talk about all such optimization techniques. Our discussion here mainly concentrates on NHibernate features that help with optimization than tricks/tweaks that people have used on their projects to squeeze an extra millisecond out of their queries.

Main features that we are going to talk about in this chapter are batching, fetching strategies, future queries, and so on. There are satellite ideas revolving around these main topics that we will look at as well. In terms of guidelines, we will talk about avoiding eager fetching, avoiding select N+1 problem, and so on. Let's get started with a discussion on batching then.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset