如何在asp.net中应用索引 [英] how to apply index in asp.net

查看:161
本文介绍了如何在asp.net中应用索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我想对数据库表应用索引,例如我的数据库中有10列,并且想在运行时通过c#在一个列上应用索引,所以我该怎么做.请帮帮我,谢谢

hi friend i want to apply index to database table for example there are 10 columns in my database & want to apply index on one column through c# at run time so how can i do it.please help me thanks

推荐答案

您是说要创建索引?

如果是这样,则可以使用存储过程(或SQL语句)在所需的表/列上创建索引.此参考 [
Do you mean create an index?

If so, you have you can use a Stored Procedure (or SQL statement) that creates an index on the table/columns you want. This reference[^] will give you a whole slew of options because you will need to customize the index to suit your needs.

But the question I have to ask is why do you need to do this? Indexes are not something that you should toy with "on the fly". They grow, massively in some cases, for a reason and that''s to cut down on seek times afterwards.


这篇关于如何在asp.net中应用索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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