Please try to follow this scenario.

I have an empty table that has a PK made of several columns, with a clustered index defined on them. I insert some data into this table and it takes, say, 1 minute.

Next, I empty the table and do the same insert. The data volume is the same, and even the data content is the same. The only difference is that the data may be in a different order. This insert takes way more time, say like, 20 minutes.

So, I guess the order in which the data is sorted makes a difference when inserting to a table that has a clustered index. Am I correct about this?

Depending on the answer, I have some follow up questions.

**View Complete Post**

## inserting same dataset but they may be sorted differently

Please try to follow this scenario.

I have an empty table that has a PK made of several columns, with a clustered index defined on them. I insert some data into this table and it takes, say, 1 minute.

Next, I empty the table and do the same insert. The data volume is the same, and even the data content is the same. The only difference is that the data may be in a different order. This insert takes way more time, say like, 20 minutes.

So, I guess the order in which the data is sorted makes a difference when inserting to a table that has a clustered index. Am I correct about this?

Depending on the answer, I have some follow up questions.