复合索引或单列索引 [英] Composite index or single column index

查看:158
本文介绍了复合索引或单列索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我想索引数据库中的某些列。总是,我的where子句中有多列的SQL。



所有这些列都已单独索引



我想删除这些单列索引,并希望为这些列创建复合索引,即创建具有多个列的单个索引,而不是多个索引,每个索引一列。







这种方法还行吗?







提前谢谢

Hi friends,

I want to index some columns in our database. Always, I have SQL with multiple columns in my where clause.

All of those columns are already indexed individually

I am thinking to drop these single column indexes and want to create composite index for these columns i.e. creating single index with several columns rather than several indexes each with one column.



Is this approach fine??



Thanks in advance

推荐答案

请看看这个...



http://grahitanusantara.blogspot.in/2011/06/single-vs- composite-indexes.html [ ^ ]

http://www.nullskull.com/q/10140481/difference-between-composite-index-and-covering-index.aspx [ ^ ]
please have a look around this...

http://grahitanusantara.blogspot.in/2011/06/single-vs-composite-indexes.html[^]
http://www.nullskull.com/q/10140481/difference-between-composite-index-and-covering-index.aspx[^]


这篇关于复合索引或单列索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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