What is a clustered index table?

Maybe I'm wrong, but it seems that these are different opinions in interwebs about what it is. SQL Server, MySQL, DB2, and PostgreSQL show different definitions for these tables.

After reading a ton from different suppliers (database manuals, user messages, etc.), I was able to identify three types of tables of interest (for this question there are many, many other types that are not of interest). Please feel free to:

  • Heap table :

    • All rows are stored (possibly unordered) in the heap table.
    • Each row has an internal ROWID that identifies it.
    • Indexes are optional. If added, they include indexed columns as the index key, plus a ROWID (to end up accessing real rows on the heap).
    • Note: this case is not of interest to this question, but I added it here to make changes to the third case below.
  • Pure index table : <- Is this a copied index table?

    • There is one main index that includes key columns as well as implicit columns in it. All data is stored in the index.
    • The data follows the main order of the index, so by definition it is sorted by the main index.
    • No need for a heap table to store rows. All data is already in the index. There is no ROWID since there is no heap.
    • SQL Server () .
    • MySQL InnoDB, , , , , .
  • + : < - ?

    • " ".
    • , , .
    • ROWID.
    • , ROWID .
    • DB2, , "Cluster".
    • PostgreSQL, , " ing Index".

, # 2 # 3 " "? ?: D

, " " , , ?

+4
1

, " " - , . , , .

. .

Postgres . "cluster" , . , .

+2

Source: https://habr.com/ru/post/1694881/


All Articles