0

Here is one of the definitions I found for clustered Index:

When is a file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index, we say that the index is clustered.

I'm having trouble understanding the above sentence regarding the clustered Indexes. The things I know about clustered index are:

  • Clustered indexes reorders the way the records are physically stored in the table, so only one clustered index is possible
  • Clustered index is created on non key attribute
halfer
  • 19,824
  • 17
  • 99
  • 186
user2643191
  • 313
  • 1
  • 3
  • 8

1 Answers1

0

Well for clustered index we have many view to look into

A clustered index is a type of index where the table records are physically re-ordered to match the index. Clustered indexes are efficient on columns that are searched for a range of values. After the row with first value is found using a clustered index, rows with subsequent index values are guaranteed to be physically adjacent, thus providing faster access for a user query or an application

You also have to understand the Non-Clustered Index

In other words, a clustered index stores the actual data, where a non-clustered index is a pointer to the data. In most DBMSs, you can only have one clustered index per table, though there are systems that support multiple clusters (DB2 being an example).

Like a regular index that is stored unsorted in a database table, a clustered index can be a composite index, such as a concatenation of first name and last name in a table of personal information.

There are several example and explanations. And this is What do Clustered and Non clustered index actually mean? one of them.

LifeOfPi
  • 625
  • 5
  • 19
  • The ordering of data entries is same as the ordering of records even in case of primary index right, when we sort the file based on primary key, how does the above definition apply to cluster index? – user2643191 Aug 09 '17 at 05:06