㈠
某表的一列重复值很多,基数很小时,应该建立什么索引?
--创建Bitmap Index,具体原理参见:B-Tree索引与Bitmap索引的锁代价的比较
例如:
create bitmap index idx_bm_product on products(list_price)
tablespace users;
㈡ 某表的一列的数值一直在增大,不是随机的数,应该建什么索引?
--反向索引,即reversed index
例如:
create index idx_rev on test (sal) reverse;
具体使用参见:深入理解Oracle索引(5):反向索引的定义、缺点和适用场景
㈢
某表的一列在平常SQL中该列都是放在函数里面,为了能用到索引来提高检索速度,该怎么办?
--创建函数索引
例如:
create index idx_fun on emp (upper(name));
<!-- 正文结束 -->
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22943950/viewspace-1116224/
,如需转载,请注明出处,否则将追究法律责任。