Since PostgreSQL
doesn't support clustered indexes, I'm considering MSSQL
server. I've read the article comparing clustered and non-clustered indexes. The gist of the article is that (emphasize mine):
Non clustered indexes store both a value and a pointer to the actual row that holds that value.
And
Clustered indexes don’t need to store a pointer to the actual row because of the fact that the rows in the table are stored on disk in the same exact order as the clustered index
As I was told there and there it was very difficult to support the physical ordering of the table's data, especially if the table is splitted among multiple drives. And now, I meet the clustered index concept assuming that data stored in some order physically. This's what I was confused by.
Question: What is the clustered index structure? Does it support tree
-like structure to traverse over, like PosgtreSQL
does for btree
indexes?