• GilaMonster (12/22/2015)


    Eric M Russell (12/21/2015)


    Try unit testing using (MAXDOP 1) query hint.

    Why? Parallel execution is good, it means SQL's using resources effectively to return results quickly. A parallel query is no more or less likely to cause blocking than a serial query, and if it runs faster it will release locks sooner to let the blocked queries run again.

    I'm just saying that MAXDOP in the development environment, where the view modification is being unit tested, may be different from the production environment. In many cases MAXDOP is set to 1 in OLTP databases.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho