YoungC


I have a table which has around 132000 rows with 24 columns. I use rda.pull download the data to PDA. For query these data, I must create a index on 5 character columns.

The data download time is good enough, around 4 mins. But it takes 12mins to create the index.

Please help to give me any idea on how to improve the whole synchroniztion speed. Thanks!




Re: Help: How to improve the speed of Sync.

BrianSquibb


Can you create an indexed view to pull the data from






Re: Help: How to improve the speed of Sync.

ErikEJ

If possible, make the colums shorter to decrease the index size. You could also consider createing the database file server side (including indexes), zipping and downloading, then unzipping on device.







Re: Help: How to improve the speed of Sync.

YoungC

Actually the major problem is create index on PDA. Create a indexed view do not improve the speed of create index.



Re: Help: How to improve the speed of Sync.

YoungC

Greate idea. Do you have some sample code of this solution Thanks!



Re: Help: How to improve the speed of Sync.

ErikEJ

I don't have a sample, but in brief you could make a solution similar to the following:

Use the same RDA.Pull code on a web server (scheduled task or service) as you are using now, and create the indexes.

Zip the file.

Pick the file up from the PDA (using the HttpWebRequest class), a sample of this is available below (from the following article: http://msdn2.microsoft.com/en-us/library/aa446517.aspx )

public void DownloadFile(string localFile, string downloadUrl)
{
 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(downloadUrl);
 req.Method = "GET";
 
 HttpWebResponse resp = (HttpWebResponse) req.GetResponse();

 // Retrieve response stream and wrap in StreamReader
 Stream respStream = resp.GetResponseStream();
 StreamReader rdr = new StreamReader(respStream);

 // Create the local file
 StreamWriter wrtr = new StreamWriter(localFile);

 // loop through response stream reading each line 
 // and writing to the local file
 string inLine = rdr.ReadLine();
 while (inLine != null)
 {
  wrtr.WriteLine(inLine);
  inLine = rdr.ReadLine();
 }

 rdr.Close();
 wrtr.Close();
}
Finally unzip the local file (several 3rd party zip libraries are available, I have used Resco)
Hope this assists.