Do any databases allow multiple indexes on the same table to be created simultaneously? Do any databases allow multiple indexes on the same table to be created simultaneously? sql sql

Do any databases allow multiple indexes on the same table to be created simultaneously?


I don't believe it's possible in Oracle, or any other DBMS. However in Oracle you can speed up index creation using options like PARALLEL and NOLOGGING.

PARALLEL allows you to parallelize the processing onto N other CPUS.

NOLOGGING forgoes writing to the redo log (which may not be for you).

CREATE INDEX some_idx   ON a_table(col1, col2, col3)PARALLEL 3NOLOGGING;


The answer is no for Oracle and according to my research it is also no for DB2. I doubt any others have that feature.


In your example, you had mutiple single-column indexes, so the following suggestion does not apply here. But I wanted to point it out anyway since it IS an example of how to cut down on index creation time in certain cases.

When the table rows are physically sorted in the same order as the index you are building, you may specify the "NOSORT" option in your create index statement. That way Oracle does not have to sort the rows during the index creation (which is a killer when the sort spills to disk).

This is typically useful when you create an empty table (or CTAS), insert the rows in some specific order (enforced by order by), and then directly create an index using the same column order as your order by statement.