daelmo wrote:
Hi Fab,
It's a lot of data to handle by .Net. In my opinion the slow time could be affected by:
A. Large data traveling though the wire.
B. The String conversion on .NET.
C. The array conversion.
In other tests I made in the past, I found that eliminating the .ToString() conversion could lead to reduce the time in 50%. Give it a try.
What about paging? It's an option in your scenario?
I can't page as this is a filter layer for the security, it's not shown to the user. It's used by Lucene to filter the result of the search, so all ID must be available all the time.
The the lucene filter require an array of string.
This is already cached, so that there isn't the sec wait time when searching, but the cache is often cleared so it impact the users sometime.
I think maybe using directly datareader may improve the query ? I don't know if you already had some experience on this.
I'll try to make some change and do some benchmark