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
 General SQL Server Forums
 Database Design and Application Architecture
 Indexes

Author  Topic 

cronus
Starting Member

1 Post

Posted - 2014-03-03 : 23:31:32
I am building my first database and have a simple question about indexes.

At how many records in a table should you consider putting an index on the table?

I don't see the point in creating an index if you have two records, but I see it if you have a million. At what point (how many records) do you think there would be a difference in performance of the database?

Thanks in advance. Cheers
Steven

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2014-03-04 : 01:48:32
@cronus - finding the right number is a matter of estimating the balance between workload, type of activity, maintenace cost.And even then, the optimizer may decide not to use an index depending on cardinality estimates.
When you're designing the index strategy - consider the difference between clustered and non-clustered indexes - http://www.sqlserver-dba.com/2011/05/sql-server-non-clustered-index-checklist.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -