New answers tagged

0

"Read chunks, but only update a few of them"... SELECT a chunk -- separate transaction, don't care about locking, etc munch on that chunk to figure out the 'few' ids to update BEGIN; SELECT ... WHERE id IN (list of the few) FOR UPDATE; minimal other work UPDATE them; COMMIT; -- plus checks for deadlocks, etc, and restart the code. The idea ...


10

Shouldn't it be at most 8 rows in this case? No, because a single execution plan can use more threads than specified by the effective degree of parallelism (DOP). Only a maximum of DOP threads will be active on a scheduler at a given moment in time. SQL Server (2005 onward) limits a parallel query to DOP schedulers, not DOP threads. Since a scheduler ...



Top 50 recent answers are included