Database: Indexing Study Notes

Index definition:

  Similar to the existence of a book catalog, you can quickly find the specified tuple from the table (each row in the table is called a tuple).

index type:

  1. Clustered index: The clustered index sorts the records in the physical data pages of the table according to the index column, and then stores it on the disk.

    1) Each table can only have one clustered index.

    2) The clustered index should be created before the non-clustered index.

    3) The clustered index contains all physical data and is a table.

  2. Non-clustered index:

    1) The index is stored separately from the physical data page, and the index uses a pointer to point to the data.

    2) Items in the index are sorted by key value, which is not necessarily the same as the order of data pages.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324635276&siteId=291194637