Setting NHibernate timeout value for implicit ToList() call
I have table with 6+ million rows and need to select. When the this was ind development our dev database has thousands of records, not millions and the following was fine:
var results = ( from e in DomainRepo where e.ESIID == esiId select e ).ToList();
So now that this is 6+ million this bombs with a timeout. Is it possible to set the timeout on a LINQ call like this? 开发者_如何学Go Or does this have to be at the HHib config? In the other place I touch the data I'm using QBE without a timeout set because of the filtering being done, but this is a straight ID call which seems perfect for the above above, except for the timeout.
Thanks.
I would suggest to page the result instead of incresing the timeout, even if you need all the rows ( some batch processing ? ) use a Take /Skip approach would light the whole architecture.
精彩评论