Oracle基础学习笔记(二)(Index)

Oracle automatically create a B-tree Index for Primary key or the column which has UNIQUE constraint.

 

CREATE [UNIQUE] INDEX index_name ON

tab_name(col_name[, col_name ...])

TABLESPACE tab_space;

 

Creating a Funtion-Based Index

ex :

CREATE INDEX i_name ON tab_name(UPPER(col_name));

 

note : need to enable the parameter QUERY_REWRITE_ENABLED (it is false by default)

ALTER SYSTEM SET QUERY_REWRITE_ENABLED=TRUE;

 

ALTER INDEX i_name RENAME TO i_name;

 

Bitmap Index

Good Candidate for Bitmap Index is a column that is referenced in many queries, but it contains only a small range of values;

If the number of distinct values of a column is less than 1 percent of the number of rows in the table, or if the values in a column are repeated more than 100 times, then the column is a candidate for a bitmap index.

 

CREATE BITMAP INDEX i_name ON tab_name(col_name);

 

阅读更多
个人分类: ORACLE 学习笔记
想对作者说点什么? 我来说一句

Oracle学习笔记

2009年06月24日 29KB 下载

oracle学习笔记

2010年09月25日 3.72MB 下载

老方块oracle培训笔记 绝密

2013年04月09日 2.61MB 下载

没有更多推荐了,返回首页

不良信息举报

Oracle基础学习笔记(二)(Index)

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭