sql server 08中的索引 [英] indexes in sql server 08

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

问题描述

有人从索引中问了一个问题,我有一张表包含巨大的记录及其用户界面,我有网格并有搜索条件和分页就在那里。然后,他问,我需要在数据库中对该表进行多少索引?如果我正在创建非集群,那么我需要制作多少以及为什么?

解决方案

它主要取决于表的使用方式。一般情况下索引应该出现在具有以下一项或多项功能的列:



1.)经常在搜索条件中使用

2.)用于加入其他表格

3.)用作外键字段

4.)具有高选择性(从总数中返回低百分比(0-5%)行的列特定值的行数)



5.)用于ORDER BY子句



希望这有帮助


您好,



查看此...



SQL 2005中的群集和非群集索引 [ ^ ]



希望这对您有所帮助。





干杯


someone asked a question from indexes that i have a table contains huge records and its user interface , i m having grid and having searching criteria and paging is there . Then , he asked , how many indexes i need to make on that table in the database ? if i m creating non clustered , then how many i need to make and why ?

解决方案

It basically depends on how the table is being used.Generally indexes should be present on columns that have one or more of these features :

1.) Frequently used in the search criteria
2.) Used to join other tables
3.) Used as foreign key fields
4.) Of having high selectivity (column which returns a low percentage (0-5%) of rows from a total number of rows on a particular value)

5.) Used in the ORDER BY clause

Hope this helps


Hi,

Check this ...

Clustered and Non-Clustered Index in SQL 2005[^]

Hope this will help you.


Cheers


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

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