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
 SQL Server Administration (2005)
 Cluster or Non Cluster

Author  Topic 

Pradip
Starting Member

32 Posts

Posted - 2009-11-25 : 07:50:59
I have transaction table of bank account and having one column accountID 10 digit char. I want to have Index on it, I think clustered index is better option, can anyone tell me why not non-clustered?

pradipjain

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-11-25 : 08:52:08
It might be hard to say for sure (obviously without knowing the table structure) A few potential considerations though:

The first: You can only have 1 clustered index. Therefore you want to get the most bang for your buck. Is that accountID the column that you would search on the most in the tabke? Is it the one generally joined to and referenced in where clauses. It probably is I imagine

The Second: Insert performance. Best insert performance is with a strictly increasing clustered index (new rows are always greater for the clustered index column that old rows). Is that the case here? Probably not as it is a table of transactions.

Would be a hard call to make. Is there not a clustered index on the table at the moment? the table is a heap right now?

it might come down to how often the table is read from or written to. If mostly writes then a strictly increasing CI might be better with whatever covering non clustered indexes implemented on the other columns.

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page
   

- Advertisement -