PRIMARY KEY or UNIQUE是BTREE 索引        


索引有两个:BTREE和BITMAP

建立索引
默认都是btree

create index emp_dept_nbr ON employees (dept_nbr)
也可以建立一个unique index

create unique index dname_uix ON departments (dept_name);
同时可以在一个表上建立多个索引
CREATE INDEX emp_seniority ON
employees (dept_nbr, hire_date)
TABLESPACE indx;

建立位图索引
CREATE BITMAP INDEX state_bix ON geography (state);
CREATE BITMAP INDEX region_bix ON geography (region);
CREATE BITMAP INDEX metro_bix ON geography (metro_area);

删除索引        
drop index 索引名字

重建索引        
alter index 索引名字 rebuild
把索引转移表空间        
alter index 索引名 rebuild tablespace 表空间名字

结合索引 coalescing
ALTER INDEX uniq_payroll_id COALESCE;

对索引重新命名
ALTER INDEX sys_c001428 RENAME TO employee_pk;

 

相关文章:

  • 2022-12-23
  • 2021-10-12
  • 2021-06-14
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-20
  • 2022-03-03
  • 2021-12-05
  • 2021-11-05
  • 2022-12-23
相关资源
相似解决方案