I've run two MERGE INTO operations on the same Delta tableโone with Deletion Vectors enabled (Case 1), and one without (Case 2).
In Case 1 (with Deletion Vectors):
executionTimeMs: 106,708
materializeSourceTimeMs: 24,344
numTargetRowsUpdated: 22
numTargetDeletionVectorsAdded: 1
In Case 2 (no Deletion Vectors):
executionTimeMs: 101,714
materializeSourceTimeMs: 12,795
numTargetRowsUpdated: 7
numTargetRowsCopied: 405,967 (full rewrite)
I expected the DV-enabled merge to be faster, but it turned out to be slower overall. Both cases used the same unpartitioned table.
My questions:
1. Why is the merge with fewer updates and one deletion vector slower than a full rewrite?
2. What factors in DV overhead or source materialization might be contributing to this result?
3. Are there known cases where non-DV merges outperform DV-enabled ones on unpartitioned tables?
Any insights or experiences would be much appreciated