Showing posts with label sys.indexes. Show all posts
Showing posts with label sys.indexes. Show all posts

Tuesday, 29 January 2013

SQL: which columns should have an index

   


In SQL tables might have primary keys and indexes. The primary key identifies each record. The key must be unique, it can't be NULL and each table must have just one key.
Indexes are something different: they are used to speed up the queries on a specific table. That means we absolutely need indexes on large tables which we often query.