I am developing an application that runs on Windows CE 6 and uses Sql Server Compact 3.5. When I am doing a simple select statement like the one below it takes about 62 ms at minimum to perform the query and return the results. In this instance
there is only 1 record in the table. The database is on an SDCard but I have tried it using the onboard flash memory with the same results. The project I am working on requires data access that is much faster than this, is that possible with
Sql Server Compact? There are no other applications/threads running.
string ConnString = @"Data Source = /SDCard/DB.sdf;mode=Exclusive;";
SqlCeConnection conn = new SqlCeConnection(ConnString);
_Command = new SqlCeCommand();
_Command.Connection = conn;
_Adapter = new SqlCeDataAdapter(_Command);
_Command.CommandText = "SELECT Col1, Col2 FROM Table1 WHERE Col1 = '1234'";
DataTable dt = new DataTable();
_Adapter.Fill(dt); //This takes about 500ms which I would expect due to JITing
_Adapter.Fill(dt); //This takes 62ms.
WinCE Hardware Specs
400MHz ARM9 processor
Thanks in advance!
View Complete Post