concept SQL query in category .net

This is an excerpt from Manning's book NHibernate in Action.
Enable the NHibernate SQL log, as described in chapter 3. You should also be prepared to read, understand, and evaluate SQL queries and their performance characteristics for your specific relational model: will a single join operation be faster than two selects? Are all the indexes used properly, and what is the cache-hit ratio inside the database? Get your DBA to help you with the performance evaluation; only she will have the knowledge to decide which SQL execution plan is the best.
Step through your application use case by use case, and note how many and what SQL statements NHibernate executes. A use case can be a single screen in your web application or a sequence of user dialogs. This step also involves collecting the object-retrieval methods you use in each use case: walking the graph, retrieval by identifier, HQL, and criteria queries. Your goal is to bring down the number (and complexity) of SQL queries for each use case by tuning the default fetching strategies in metadata.
You’ll learn more about running SQL queries in section 8.5.4. Finally, here’s how you use the strongly typed ICriteria interface to do the same thing in a different way:
Note that the stored procedure must return a resultset to be able to work with NHibernate. Another limitation is that associations and collections aren’t supported; a SQL query calling a stored procedure can only return scalar values and entities.