문제

On one of my existing tables I have a btree index. I am now adding a unique constraint to this column. I know behind the scenes it will add a UNIQUE btree index to this column as well.

In this scenario, should I drop the original btree index added to the column to prevent redundant indexes?

도움이 되었습니까?

해결책

If the unique constraint is defined on the same columns as the index, and the columns are in the same order, the index is redundant with the index created by the constraint and can be dropped without any problems.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top