Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which DBMSs offer index-organized tables?

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, PostgreSQL, Informix and DB2.

like image 949
Peter G. Avatar asked Aug 22 '10 12:08

Peter G.


People also ask

What is an index organized table?

An index-organized table has a storage organization that is a variant of a primary B-tree. Unlike an ordinary (heap-organized) table whose data is stored as an unordered collection (heap), data for an index-organized table is stored in a B-tree index structure in a primary key sorted manner.

Which is used for creating index for table?

The CREATE INDEX statement is used to create indexes in tables. Indexes are used to retrieve data from the database more quickly than otherwise.

How do you find the index of a table?

To see the index for a specific table use SHOW INDEX: SHOW INDEX FROM yourtable; To see indexes for all tables within a specific schema you can use the STATISTICS table from INFORMATION_SCHEMA: SELECT DISTINCT TABLE_NAME, INDEX_NAME FROM INFORMATION_SCHEMA.

What are the indexes in Oracle?

An index is a schema object that contains an entry for each value that appears in the indexed column(s) of the table or cluster and provides direct, fast access to rows. Oracle Database supports several types of index: Normal indexes. (By default, Oracle Database creates B-tree indexes.)


2 Answers

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.

like image 104
Mike Q Avatar answered Oct 07 '22 16:10

Mike Q


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

like image 25
SQLMenace Avatar answered Oct 07 '22 15:10

SQLMenace