Index Tree Dump

An index tree can be dumped using

    ALTER SESSION SET EVENTS 'immediate trace name treedump level object_id';

where object_id is the object number of the index (in DBA_OBJECTS)

The tree dump includes

The following ORADEBUG command has the same effect

    ORADEBUG DUMP TREEDUMP object_id

In Oracle 9.2 a treedump may crash if the index has been created by a primary / unique constraint e.g.

    CREATE TABLE t1 (c1 NUMBER PRIMARY KEY);

or

    CREATE TABLE t1 (c1 NUMBER);
    ALTER TABLE t1 
    ADD CONSTRAINT t1pk PRIMARY KEY (c1);

The treedump crashes when ind$.property > 256

This problem can be prevented by creating the index before creating the constraint