I use named query to perform complicated select with inner queries and MSSQL contains (full-text search). It's execution time is quite long.
It's written as named query in xml file
I use
IQuery query = context.Session.GetNamedQuery("QueryName");
query.SetFirstResult(10);
query.SetMaxResults(20);
Has I understood correctly, that NHibernate execute the provided query and map only 10-20 rows to objects? So, obviously, NHibernate does not modify query (it's MSSQL specific).
Is it right? Does NHibernate use some specific technic to get only 10-20 objects?
Can I get the total rows number (not mapped)? Is it possible not to execute the same query with Select count (*)?
I believe what I need is only to get affected rows count. Can it be retrived?
|