SuoThe reference will contain rowid to locate the specific location, but the unique index will not use rowid as part of the "index key"
For example, if a non-unique index is created on column col1, the index key is col1 | rowid, so that the index key is unique, but the unique index does not add rowid to the column to form the index key.
Test:
SQL> Conn/As sysdba is connected. SQL> Create Table T as select * From dba_objects; the table has been created. SQL> Create index t_idx on T (object_id); the index has been created. SQL> select T. header_file, T. header_block from dba_segments T 2 where T. segment_name = 'T'; header_file header_block ----------- ------------ 1 58408sql> alter system dump datafile 1 block 58410; the system has changed. Common index with the following content: Row #0 [8024] flag: ------, lock: 0, Len = 12col 0; Len 2; (2): C1 03col 1; Len 6; (6): 00 40 E4 29 00 30sql> drop index t_idx; the index has been deleted. SQL> create unique index t_idx on T (object_id); the index has been created. SQL> select T. header_file, T. header_block from dba_segments T 2 where T. segment_name = 't_ idx'; header_file header_block ----------- ------------ 1 92136sql> alter system dump datafile 1 block 92138; the system has changed. SQL> unique index, content: Row #0 [8025] flag: ------, lock: 0, Len = 11, data :( 6): 00 40 E4 29 00 30col 0; len 2; (2): C1 03
It can be seen that in a non-unique index, oracle adds a column to store the corresponding rowid. For a unique index, it is placed in data (6 ).
However, rowid will still be stored