oracle 使用复合索引

[复制链接]
查看11 | 回复2 | 2011-2-18 11:42:47 | 显示全部楼层 |阅读模式
大家好:
请教一下,oracle在有的时候会使用到复合索引,请问在什么情况下使用复合索引比较好,什么情况下使用普通索引比较好啊?请各位大侠多多指教,谢谢!

回复

使用道具 举报

千问 | 2011-2-18 11:42:47 | 显示全部楼层
Follow these guidelines for choosing keys for composite indexes:
Consider creating a composite index on keys that appear together frequently in WHERE clause conditions combined with AND operators, especially if their combined selectivity is better than the selectivity of either key individually.
If several queries select the same set of keys based on one or more key values, then consider creating a composite index containing all of these keys.
回复

使用道具 举报

千问 | 2011-2-18 11:42:47 | 显示全部楼层
好的,明白了,谢谢楼上的兄弟!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行