Incremental load key table - ranges instead of lists (integer keys only)

Currently when choosing the incremental option with soft/hard deletes TX brings in all KEYS. 

For tables with integer keys and have a dense population you could consider taking in all keys as ranges which could reduce the records from millions of rows to a few 1000 rows. I think this could speed things up.

SELECT MIN(id) as range_start, MAX(id) as range_end
SELECT id, id - ROW_NUMBER() over (order by id) as range_id
FROM (values (1), (2), (3), (5), (6), (8), (9), (11), (13), (15), (16), (20))v(id) ) A
GROUP BY range_id


Please sign in to leave a comment.