Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12554

We add to clustered index in order so why is table fragmented?

$
0
0

Here's an interesting (maybe) case!

During an ETL process we create and populate a fairly large table.

It has a non-unique clustered index, and we carefully sort the data and add it in sorted order.  That is, we do an SSIS fast load where the data comes from a select with an order by.

And yet when we're done, the table is horribly fragmented.

Why?

I can think of two possible answers, but wonder if anyone knows.

Thanks,

Josh

ps - my two guesses are either or both of (a) the fast load does not preserve order, and (b) the non-unique clustered index adds uniqueifiers out of order.

pps - the table is built with 100% fill factor.


Viewing all articles
Browse latest Browse all 12554

Trending Articles



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