views:

14

answers:

2

I have two types of custom handhelds which are similar, but slightly different, each running the same WinForm application and a WinCE database:

Type 1: WinCE 4.2, 400 mhz, 93244 kb Type 2: WinCE 5.0, 520 mhz, 84208 kb

Type 1 will happily proceed through a large batch db operation (initiated by the app), by Type 2 will consistently begin c-r-a-w-l-i-n-g (for several to many cycles) at around the 200 cycle mark. At several points it will begin running normally and then crawl again.

The app does several db op's (inserts, updates and selects, no deletes).

To simplify my situation, I've built a small test app which essentially does this:

command_s.CommandText = "select dvr from vr where vid = 2211250";
command_u.CommandText = "update pvr set LocationID=81 where Status='OK' and vri = 27861";

while(going)
{
    command_s.ExecuteScalar();
    command_u.ExecuteNonQuery();
}

and set it off running on the two units side by side. Sure enough, the slower (400 mhz) unit is outpacing the faster (520 mhz) unit (it's about 5000 cycles ahead right now) and I can see noticable pauses on the 520 mhz unit.

What is causing this?

A: 

What are the memory on these devices and what OS version are they using?

nitroxn
He answers both of those in his original question.
ctacke
A: 

You've not told us much about your test environment. Assuming that you're using the same version of SQL CE on both, then it's probably that either a driver (filesystem or bus) on the slower system is slower or the actual media you're storing on is.

For example if one of them was writing to RAM and the other to Flash, then obviously the the RAM device is going to perform much faster. Less obvious might be that one is using NAND and the other using NOR flash and the slowness of the NAND write's slowness is affecting you. Or maybe you're using USB and one system has a much faster USB bus.

There are a whole host of reasons you might see this disparity and without knowing a lot about your target hardware, it's difficult to tell you exactly why.

ctacke
The versions of SqlCE should be the same (it's provided as a reference assembly when building the exe). They both write to flash though I do believe the faster system (which performs slower) is SDHC and the slower system (which performs faster) is MMC.
Michael
Well you have two completely separate bus architectures there, and it's quite possible that it's a bus difference. Have you tried just a simple file read/write on both? I bet you'll find the same difference, meaning this has nothing to do with SQLCE and everything to do with your hardware. Identifying the "problem" with the CE 5.0 device is probably going to require an oscilloscope, Platform Builder and a deep understanding of the SDHC and Flash drivers of that CE 5.0 system.
ctacke
Running a purely file-based stress test on the two units does seem to recreate the issue. It seems the SDHC vs MMC difference is causing the issue.
Michael