设置隐式 ToList() 调用的 NHibernate 超时值
我有超过 600 万行的表,需要进行选择。当这是工业开发时,我们的开发数据库有数千条记录,而不是数百万条,以下内容很好:
var results = ( from e in DomainRepo where e.ESIID == esiId select e ).ToList();
所以现在这是 6+000000 个超时的炸弹。是否可以像这样设置 LINQ 调用的超时?或者这必须在 HHib 配置中吗?在另一个地方,我触摸了我正在使用 QBE 的数据,因为已经完成了过滤,所以没有设置超时,但这是一个直接的 ID 调用,除了超时之外,对于上述内容来说似乎很完美。
谢谢。
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? 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议对结果进行分页而不是增加超时,即使您需要所有行(一些批处理?),使用 Take /Skip 方法会照亮整个架构。
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.