Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 clustered index or not

Author  Topic 

dev01
Starting Member

1 Post

Posted - 2009-03-30 : 03:15:43
Hi all,

I have a table with 25-30 million records. Presently the table has a clustered index on the unique "code" field which is a varchar(12) type. And a nonclustered index on a datetime field.

Is it advisable to switch the clustered index to datetime field and non clustered to the varchar field, as i have read clustered index work good over rage of values. Please comment

Thanks

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-30 : 04:54:34
The 2 main considerations for clustered index are uniqueness and how used often in queries.
http://technet.microsoft.com/en-us/library/ms190639.aspx
Your current set-up is probably best unless most queries are based on date ranges.
Go to Top of Page
   

- Advertisement -