Re:Postgres Indexes for Newbies
by hans_castorp on Thursday January 20, 2022 @08:13AM
(#30008431)
> SQL Server and Oracle both default to heaps
I don't think that's true for SQL Server.
If you define a primary key in SQL Server, this is automatically a clustered index.
Re:Postgres Indexes for Newbies
by tomnipotent on Thursday January 20, 2022 @03:36PM
(#30014497)
Any table in SQL Server without a clustered index will be stored as a heap.
https://docs.microsoft.com/en-us/sql/relational-databases/in...
Re:Postgres Indexes for Newbies
by hans_castorp on Friday January 21, 2022 @01:21AM
(#30019867)
Yes, but the _default_ (and that's what I was referring to) is a clustered index.
Re:Postgres Indexes for Newbies
by tomnipotent on Saturday January 22, 2022 @12:36AM
(#30033972)
Then the definition depends on whether you consider adding a primary key as default or not. I would not consider it default, though it is customary.
SQL Server and Oracle both default to heaps (though it's rare to see a SQL Server table without a clustered index).