RE: Answer 1
Thank you but @table was just a test query.
In my case, query contents doesn't change the matter.
The real case is:
SQL Server was running on multi-processor machine, there are quite heavy load and all the queries (updates, inserts, selects) are okay.
Long queries are yield by the scheduler.
[My proposal] SQL Server's Scheduler thinks: It's a long query and perhaps parsing of it is CPU-intensive; we can run it
after the small queries finish.
But on a production server small queries never finish, and as the result the long query is interrupted in a very rude manner. Maybe this is a bug of Microsoft SQL Server Scheduler?
I have read this:
http://msdn.microsoft.com/en-us/library/aa175393(SQL.80).aspx
It's said there that
SOS_SCHEDULER_YIELD
means that a query has voluntarily stopped himself for other threads. Are there any ways to prevent this??
Thanks