Ultalite - Optimal method to use paging -
09-12-2008
, 07:54 AM
I try to find the optimal method for paging tables (result of queries) with
many records.
Considerations: Ultralite on Windows Mobile(WM5) (C# or C++)
Method 1:
ULDataAdapter readAdapter = new ULDataAdapter("SELECT * FROM Table_A",
Connection);
DataSet readDataset = new DataSet();
readAdapter.Fill( readDataset, 1000, 10, "myresults" );
Elapsed Time= 7 seconds
Method 2:
ULCommand command = new ULCommand();
command.CommandText = "SELECT TOP 10 START AT 10000 * FROM tableB1";
command.CommandType = CommandType.Text;
ULDataReader reader = CommUL.ExecuteReader(
CommandBehavior.SequentialAccess );
Elapsed Time = seconds
Method 3
ULTable ulTable;
ulTable = ConnUL.ExecuteTable( "tableB1", "primary",
CommandBehavior.SequentialAccess );
ulTable.MoveRelative(10000);
Elapsed Time = 1.6 seconds
Basically I want what is the optimal method to Move to a specific page in a
result data set?
Everything is fine when numbers of rows are less than 10.000
Thanks |