Hi All,
I have 2 dataservers, 1 on SQL 2000 and another on SQL 2008.
On the SQL 2000 database, there is a table with 12 columns and a 4 column primary key with clustered index on it. There are hundreds of millions of records in that table. Problem is, we do randon inserts in this table and I have debugged the code which shows that INSERT command on this table does take a lot of time (and off course resources).
What can be the best way to get around this situation? Should I change this clustered index primary key to non-clustered primary key? Many of our clustered indices are created with the concept that primary key should be created as clustered index.
Another, more conceptual question is, clustered or non-clustered, both are Btree indices. Randon inserts will do similar activity in case of both indices. In clustered, data is physically arranged in order, same is in non-clustered (all columns which are part of the index are ordered to create that index). Is the only difference between them the fact that, in clustered index all the row data is stored and in non-clustered only index columns are stored ?? or is there more than that?
All my questions are with respect to random inserts (not with respect to reading efficiancy).
Thanks in advance.