cancel
Showing results for 
Search instead for 
Did you mean: 

What does a value of 5 in "SYSIDX.unique" mean?

VolkerBarth
Contributor
2,826

The SYSIDX system view has a column "unique" that classifies the logical index as follows:

Indicates whether the index is a unique index (1), a non-unique index (4), or a unique constraint (2). A unique index prevents two rows in the indexed table from having the same values in the index columns

What does a value of 5 mean? An unique index with the new "CREATE INDEX ... WITH NULLS NOT DISTINCT" clause?

(At least that seems to be the case in my tests...)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

You are correct. The values are:

  • 1 - index is a unique index
  • 2 - index is for a UNIQUE constraint
  • 3 - reserved
  • 4 - index is not unique
  • 5 - index is WITH NULLS NOT DISTINCT

I will make sure that the documentation is modified appropriately. Thanks for reporting the oversight.

VolkerBarth
Contributor
0 Kudos

I may be hairsplitting but for the docs, I guess the description for values 1 and 5 should be worded differently as both are for unique indizes, such as:

  • 1 - index is a unique index (not declared WITH NULLS NOT DISTINCT)
  • 5 - index is a unique index WITH NULLS NOT DISTINCT

(Apparently, that would only make sense for v12 and above...)

Answers (0)