# Invisible Index

+ `Invisible Indexes` : will not be used by the query optimizer
+ “Invisible” is only for the optimizer, invisible indexes can still be modify or deleted
+ Even if you use SQL Hint to force an index, the optimizer cannot use an invisible index
+ Do not allow primary key indexes to be invisible
+ `ALTER INDEX` statement to modify the visibility of an index, you can set the index to Visible or Invisible
```
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE(c2));
CREATE UNIQUE INDEX c1 ON t1 (c1) VISIBLE;
ALTER TABLE t1 ALTER INDEX c1 INVISIBLE;
```
------------------------------------------------------------
invisible hidden
When we are unsure whether a newly created index is safe and secure, or if deleting an index would cause irreparable loss online, we can try to adjust the index online by hiding or not hiding it.
- Invisible Indexes (Invisible Indexes) are not used by the query optimizer
- “Invisible” is only for the optimizer, invisible indexes can still be modify or deleted
- Even if you use SQL Hint USE INDEX to force an index, the optimizer cannot use an invisible index
- Do not allow primary key indexes to be invisible
- The ALTER INDEX statement modify the visibility of an index. You can set the index to Visible or Invisible
```
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE(c2));
CREATE UNIQUE INDEX c1 ON t1 (c1) VISIBLE;
ALTER INDEX t1 ALTER INDEX c1 INVISIBLE;
```
