ADO.Net DataTables 有索引吗? [英] Do ADO.Net DataTables have indexes?

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

问题描述

我使用的是 VSTS 2008 + C# + .Net 3.5 + SQL Server 2008 + ADO.Net.如果我使用 ADO.Net 的 DataTable 从数据库中加载一个表,并且在数据库表中,我在表上定义了几个索引.我的问题是,ADO.Net DataTable上是否有相关的索引(和我在物理数据库表上创建的索引一样)来提高对DataTable的某些操作性能?

I am using VSTS 2008 + C# + .Net 3.5 + SQL Server 2008 + ADO.Net. If I load a table from a database by using a DataTable of ADO.Net, and in the database table, I defined a couple of indexes on the table. My question is, whether on the ADO.Net DataTable, there is related index (the same as the indexes I created on physical database table) to improve certain operation performance on DataTable?

提前致谢,乔治

推荐答案

George,

答案是否定的.

实际上,可以在内部使用某种索引,但仅作为实现细节.例如,如果您创建了一个外键约束,可能会得到一个索引的帮助.但这对开发者来说无关紧要.

Actually, some sort of indexing may be used internally, but only as an implementation detail. For instance, if you create a foreign key constraint, maybe that's assisted by an index. But it doesn't matter to a developer.

这篇关于ADO.Net DataTables 有索引吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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