create
unique
index
idx_test_uid
on
test_uid(
name
) online tablespace tablespace2;
附:
1、作为一个好习惯,不要把索引和表格的数据放在同一个表空间。一般索引单独建一个表空间。
2、建立索引切记加online这个参数,尤其是在大表操作。这个参数加上以后,除了create过程中index 保持online状态,Oracle还会在create index之前等待所有DML操作结束,然后得到DDL锁,开始create.参考链接:https://blog.youkuaiyun.com/xzg1109/article/details/78900450