加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle – 两部分单一索引是什么意思?

发布时间:2020-12-12 13:13:08 所属栏目:百科 来源:网络整理
导读:In general,every index on a table slows down INSERTs into the table by a factor of three; two indexes generally make the insert twice as slow as one index. (Yet,a two-part single index is not much worse than a single-part single index). 我

In general,every index on a table slows down INSERTs into the table
by a factor of three; two indexes generally make the insert twice as
slow as one index. (Yet,a two-part single index is not much worse
than a single-part single index).

我从Richard Niemiec撰写的Oracle 9i Performance Tuning Tips and Techniques(Osborne Oracle Press Series)中得到了这一点.

以下术语的含义是什么:

>两部分单指数
>单件单索引
>还有更多种类的索引吗?

.

解决方法

通过两部分索引我假设Rich表示复合索引,即在多列上构建的索引.像这样:

create index t23_t_idx on t23 (col4,col2);

而单个部分索引索引单个列:

create index t23_s_idx on t23(col1);

上面创建的索引是b树索引. Oracle有许多其他类型的索引.对于初学者,索引可以是唯一的,在这种情况下,它们只允许索引列中给定值的一个实例(或复合列的值的排列).

还有位映射索引,这会对DML造成更高的性能损失,但会加速某些类型的查询;很少遇到数据仓库之外的位图索引.

我们可以创建基于函数的索引,它允许我们索引确定性函数的结果(即保证为给定输入产生相同结果的函数).这就是我们如何在日期列上构建一个忽略time元素的索引:

create index t23_fbi_idx on t23( trunc(col_34));

我们还可以在文本列上构建域索引.并且有分区表的特殊索引.

所有这些都在文档中有更详细的介绍. Find out more.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读