处理大ADODB记录在数据表中设置? [英] Handling a large ADODB record set in data table?

查看:108
本文介绍了处理大ADODB记录在数据表中设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我加载了约3万行(ADODB记录集)大结果集到的数据表。它花费的时间太长,甚至加载结果集到一个数据表。我想找出提取结果集的一部分,然后加载到数据表中的一种方式。另外,就是加载到数据表,然后看它有没有办法直接读取记录,而不是直接?

这是在code我用它来填补我的数据表 -

  OleDbDataAdapter的oleDA =新OleDbDataAdapter的();
数据表DT =新的DataTable();
oleDA.Fill(DT,myADODBRecordset);
 

解决方案

下面是一些要考虑的选项:

  1. 获取只有你真正需要使用的行和列。

  2. 获取一些数据,让用户请求下一组行他们想什么时候。

  3. 编写优化的SQL查询

  4. 不要使用一个数据表,除非你要因为它包含更多的元数据信息,其他列表类型的对象。

  5. 考虑使用托管.NET提供。

I am loading a large result set of about 3 million rows (ADODB record set) into a data table. Its taking too long to even load the result set into a data table. I want to find out a way of extracting only part of a result set and then loading it into a DataTable. Alternatively, is there a way to directly read the recordset directly instead of loading it into a data table and then reading it ?

This is the code I use to fill my DataTable -

OleDbDataAdapter oleDA = new OleDbDataAdapter();
DataTable dt = new DataTable();
oleDA.Fill(dt, myADODBRecordset);

解决方案

Here are some options to consider:

  1. Get only the rows and columns you really need to work with.

  2. Get some data and let the user ask for the next set of rows when they want to.

  3. Write optimized SQL queries

  4. Don't use a DataTable unless you have to because it contains more metadata information that other list-type objects.

  5. Consider using a managed .NET provider.

这篇关于处理大ADODB记录在数据表中设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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