views:

54

answers:

3

My current knowledge:

  • Oracle does offer index-organized tables and defaults to heap-organized.
  • I heard that SQL-Server uses only index-organized tables

I am especially interested in answers for MySQL, Informix and DB2.

+1  A: 

SQL Server can store table data in either Heap Structures or Clustered Index Structures. If a table doesn't have a clustered index then it is considered a heap. For more details see here Heap Structures and Clustered Index Structures

SQLMenace
+1  A: 

MySql has clustered indexes but there appears to be limited control on these indexes.

MySql clustered indexes and see this question here

DB2 has MDC (multi-dimension cluster) which can effectively index organise the table in several ways. I've never used them but you can probably just have a single dimension MDC which would be the same as a standard clustered index.

Oracle is a bit of a pain. Last time I checked with its IOT implementation requires you create the table as IOT and you can't change it later, which is annoying when you want to load a load of data with no indexes for speed and then index it after.

Mike Q
@Mike Thanks! I'm willing to accept some pain for a sizeable chunk of performance ;-).
Peter G.
Now I looked up clustered index for Informix, et voilà it's there too! So, my candidate DBMSs all seem to support IOT aka clustering indexes.
Peter G.
+1  A: 

As for Informix Dynamic Server (IDS) or Standard Engine (SE), they both support clustered and non-clustered indexes. IDS uses RSAM and SE uses C-ISAM B-Tree indexing. For both, when a cluster index is created, a table's rows are physically ordered in the same order as the index, but as new rows are added to the table, the row is physically placed at EOF (heap).

Frank Computer
"... but as new rows are added to the table, the row is physically placed at EOF (heap). " Oh, that comes as a surprise. Thanks for posting this.
Peter G.