Question: HI all,

How does NHibernate executes the queries? Does it manipulates the queries and uses some query optimization techniques? And what is the query execution plan followed by NHibernate?

Answer: 
> 
> How does NHibernate executes the queries? 
> 
> 
> 

Not exactly sure about the question. But NH executes queries using normal ADO.NET with all the data passed as parameters.

> 
> Does it manipulates the queries and uses some query optimization techniques?
> 
> 
> 

It generates as optimal queries as possible with the information provided for it.  

It caches not only the queries, but also the data returned by them if configured so.

> 
> And what is the query execution plan followed by NHibernate?
> 
> 
> 

NH takes into account that the execution plan should not be generated on the server if not required. So the execution plan will be the same for all queries of of the same kind.
You can use a tool, such as [NHibernate Profiler](http://nhprof.com/) or SQL Server Profiler, to view the queries being executed. You may also want to research NHibernate's caching capabilities.