在现有表Oracle上创建索引 [英] Create index on existing table Oracle

查看:179
本文介绍了在现有表Oracle上创建索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在oracle的现有表上创建索引是否安全?

Is it safe to create an index on an existing table in oracle?

像这样:

CREATE INDEX table_sample_ix03
      ON table_sample
(
  col4,
  col22
)
TABLESPACE data
STORAGE
(
  INITIAL        10M    NEXT          2M
  MINEXTENTS      1     MAXEXTENTS  100
  PCTINCREASE     0
)
;


推荐答案

在创建索引时建议使用ONLINE子句正在桌面上运行DML查询。请参见 http://docs.oracle.com/cd/B19306_01/ server.102 / b14200 / statements_5010.htm

The ONLINE clause is recommended when you create the index while DML queries are being run on the table. See http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5010.htm

示例:

CREATE  INDEX "MYINDEX" ON "MYTABLE" ("MYCOLUMN")  ONLINE;

这篇关于在现有表Oracle上创建索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆