问题描述
我想知道这是否可能.
我有一个包含数十万个数据的表.
正如您已经知道的那样,
带有一堆where的select语句仍然会在至少4分钟内为我提供结果,导致我在.net屏幕上收到超时错误.
我想知道是否可以设置一个时间,例如10秒.
然后查询将在10秒后自动停止,并向我提供从第一秒到第十秒仅检索到的所有结果.
如果找到所有数据,则没有必要.只是有些会做.
谢谢.
I wonder if this is possible.
I have a table which contains hundreds of thousands of data.
And as you''ve already figured out,
having a select statement with a bunch of wheres will still give me the results in at least 4 minutes, causing me to get a timeout error on my .net screen.
I would like to know if it''s possible to set a time, say 10 seconds.
And then the query will automatically stop in 10 seconds and give me all the results that have been retrieved only from the first second to the tenth second.
It''s not necessary if it find ALL the data. Just SOME will do.
Thanks.
推荐答案
这篇关于如何在执行时间达到**秒(SQL)时中断执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!