N
news
Hello all.
How do you do that you are able to read 20.000 records in a few seconds (I
have read somewhere 20 or 30seconds)???
1) My Configuration is SQLCE 2.0, CF 1.0 SP1, iPaq 5450, PPC2002
2) My table has 8.000 records only and 15 columns
3) I have indexes there.
Here is definition of my table
-------------------------------------
2 ApplicationID nchar 2 0
2 ProductID nchar 25 0
0 ProductCategoryRepID nchar 6 1
0 ProductCategoryID nchar 1 1
0 ProductGroupID nchar 6 1
0 ProductTypeID nchar 6 1
0 TesterCode nchar 25 1
0 Description nchar 40 1
0 EAN nchar 13 1
0 ItemsCount int 4 1
0 Price numeric 9 1
0 AdvisedPrice numeric 9 1
0 Tax int 4 1
0 Status nchar 1 1
0 DeliveryDate nchar 6 1
0 StoreAmount nchar 15 1
0 SortKey int 4 1
0 IsNew bit 1 0
1 rowguid uniqueidentifier 16 0
-------------------------------------
4) This construction takes about 84 seconds
SqlCeCommand sqlCmd = new SqlCeCommand("SELECT ProductID,
ProductCategoryRepID, ProductCategoryID, ProductGroupID, ProductTypeID,
TesterCode, Description, EAN, Price, Status, SortKey, IsNew FROM
tblProducts", AppDatabase.AppSqlConn);
SqlCeDataReader dReader = sqlCmd.ExecuteReader();
ArrayList aList = new ArrayList();
while(dReader.Read())
{
object[] row = new object[12];
dReader.GetValues(row);
aList.Add(row);
}
5) This construction takes 127 seconds
SqlCeDataAdapter daProducts = new SqlCeDataAdapter("SELECT ProductID,
ProductCategoryRepID, ProductCategoryID, ProductGroupID, ProductTypeID,
TesterCode, Description, EAN, Price, Status, SortKey, IsNew FROM
tblProducts", AppDatabase.AppSqlConn);
daProducts.Fill(AppDatabase.AppDataSet,"tblProducts");
WHAT is wrong?????
Please help me, DeathLine is comming....
Thanks
(e-mail address removed)
How do you do that you are able to read 20.000 records in a few seconds (I
have read somewhere 20 or 30seconds)???
1) My Configuration is SQLCE 2.0, CF 1.0 SP1, iPaq 5450, PPC2002
2) My table has 8.000 records only and 15 columns
3) I have indexes there.
Here is definition of my table
-------------------------------------
2 ApplicationID nchar 2 0
2 ProductID nchar 25 0
0 ProductCategoryRepID nchar 6 1
0 ProductCategoryID nchar 1 1
0 ProductGroupID nchar 6 1
0 ProductTypeID nchar 6 1
0 TesterCode nchar 25 1
0 Description nchar 40 1
0 EAN nchar 13 1
0 ItemsCount int 4 1
0 Price numeric 9 1
0 AdvisedPrice numeric 9 1
0 Tax int 4 1
0 Status nchar 1 1
0 DeliveryDate nchar 6 1
0 StoreAmount nchar 15 1
0 SortKey int 4 1
0 IsNew bit 1 0
1 rowguid uniqueidentifier 16 0
-------------------------------------
4) This construction takes about 84 seconds
SqlCeCommand sqlCmd = new SqlCeCommand("SELECT ProductID,
ProductCategoryRepID, ProductCategoryID, ProductGroupID, ProductTypeID,
TesterCode, Description, EAN, Price, Status, SortKey, IsNew FROM
tblProducts", AppDatabase.AppSqlConn);
SqlCeDataReader dReader = sqlCmd.ExecuteReader();
ArrayList aList = new ArrayList();
while(dReader.Read())
{
object[] row = new object[12];
dReader.GetValues(row);
aList.Add(row);
}
5) This construction takes 127 seconds
SqlCeDataAdapter daProducts = new SqlCeDataAdapter("SELECT ProductID,
ProductCategoryRepID, ProductCategoryID, ProductGroupID, ProductTypeID,
TesterCode, Description, EAN, Price, Status, SortKey, IsNew FROM
tblProducts", AppDatabase.AppSqlConn);
daProducts.Fill(AppDatabase.AppDataSet,"tblProducts");
WHAT is wrong?????
Please help me, DeathLine is comming....
Thanks
(e-mail address removed)