Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

Split Sort Collapse and CDC __$operation and __$update_mask

$
0
0

We have a (many actually) table with cdc turned on. I noticed in an update I did not specify exact keys as below the query plan shows a split sort collapse operation and interestingly cdc table shows every update was actually a delete and insert. This creates a slight problem with 

UPDATE TOP (10)  t SET AcCd = 'GV9' FROM tTrans.Trans t WHERE cntycd = '01003' OPTION (RECOMPILE)
When I use the update below split sort collapse is not in the query plan and cdc now shows records with operation 3, and 4 and update mask is also showing a single column modified instead of all
UPDATE   t SET AcCd = 'GV7' FROM tTrans.Trans t WHERE cntycd = CAST('01003' AS CHAR(5)) AND batchdt = 19300101 AND batchseq = 1

Is this an intended behavior or is this a bug?

Thank you


Gokhan Varol


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>