Question of the Day Two

Today we continue our series with our second question of the day.

What is the difference between a clustered and non-clustered index?

In simplest terms, a clustered index is the actual data, reordering the way that the records are physically stored.  Because of this, each table can only contain one clustered index.

However, a non-clustered index is more like a pointer to the actual record.  The logical order of the non-clustered index does not usually match how the data is stored physically.

There is also a third option, the heap, which is a table without an index at all.  Without an index, the server would have to read through all of the records in order to find the data queried.  Enjoy!


About SQLGator

Microsoft Data Platform MVP, Florida Gator, Star Wars fanatic and is there anything else...oh yeah PS4! I am a geek and SQL Server Business Intelligence Consultant, there are other technologies greater than these? Not so fast my friend! I also love to travel to new and exotic places.

Posted on August 4, 2012, in SQL Schoolhouse and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: