Hi,

I'm wondering if there is a high performance way of getting the result
count from a SQL statement (SQL Server) before actually loading the
rows into the entity objects, via an HQL query.

i.e.

Do complicated query - result set = 45000 rows
Get count. If count < 1000 load entities

At the moment I'm doing a SQL COUNT query followed by a SQL get data
query, but its basically the same query twice and I've almost doubled
the time the application takes to get the data.

The query is generated on fly so I can't named query it (too many
potential parameters that are set at run-time)

Any ideas?

Thanks


--

You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to