使用 Managed Esent 接口从表中读取数据。我正在使用(伪)执行此操作:
List<ColumnInfo> columns; //Three columns to be read
using (var table = Table(session,DBID,"tablename",OpenTableGrbit.Readonly))
{
while (Api.TryMoveNext(session, table))
{
foreach (ColumnInfo col in columns)
{
string data = GetFormattedColumnData(session,table,col);
}
}
}
我只对来自三列的数据感兴趣,大约 4,000 行。但是,表本身是 1,800,000 行。因此,这种方法仅读取我想要的数据非常慢,因为我需要读取所有 1,800,000 行。有更快的方法吗?