sql

[SQL] Clustered Index vs Non-clustered Index

Clustered Index

  • Physically order the data on the table
  • Can be used only one per table
  • Faster to read since it doesn’t have to go first to the index and then to the table
  • Insert/Update can be slower if it need to rearrange the data

Non Clustered Index

  • Has a duplicate of the data from indexed columns kept ordered together with pointers to the actual data rows.
  • Can be used many time on a table
  • Slower to read since it has to go first to the index then to the table
  • Faster for insert and update since it doesn’t need to rearrange the data
Advertisements

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s