I have this Plan Explorer session that contains two query similar query plans.
They are both a contrived way to update some rows in a table
One of the query plans (history version=8) runs fine and assigns the numbers 1,2,3,4,5 in an arbitrary way to the five rows.
But the other query plan (history version=7) assigns random values with duplicates (i.e. 3,4,4,2,5)
The big distinction I see is that 25 rows (not 5) go through the "sequence project" operator and get filtered to 5 later. Here's my question:
Is this a flavor of the weirdness described in this connect issue?
Our work-around right now is to avoid recursive CTEs and ROW_NUMBERs in the same statement. But I am curious about the behavior.
By mjswart 129 asked May 12 at 07:03 PM
There are multiple fundamental issues here.
By SQLkiwi ♦ 6.6k answered May 14 at 12:18 PM