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?
@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