Sometimes the new approach requires a little change to your code, while other times it will require major rewrites making it an important investment. Is it worthwhile? Well, we have to measure the performance improvement to asses how much of an improvement (if at all) we are talking about.
There are three major tools to help you in the performance assessment and tuning of your application:
- Code instrumentation - a set of programming tools that help you measure the timings of specific portions of your code.
- The .NET CF Profiling tools - these help you take a bird's eye view on your whole application's performance drivers.
- The Query Execution plan - this is a SQL Compact-specific tool that shows you how the Query Analyzer compiles your SQL command and how it plans to execute it. Some of the execution bottlenecks may become apparent and, with some skills you will be able to make your command run faster.
With the .NET CF 3.5, Microsoft introduced a much more precise time measurement intrument, the System.Diagnostics.StopWatch. Although more precise, I generally don't use this timing method because I don't need all the precision. Timing code involves running a fairly large number of trials and averaging out the timing at the end, so individual timing precision is less of an issue. Also, most of the time you are really concerned about shaving 5, 10 or more seconds from a particular piece of code, you won't care about improving it by 10 milliseconds.
I will be looking at these topics in the next few posts about SQL Compact performance.

1 comments:
I looked at this back in 2007 and when I was testing different interfaces to different lite dbs sqlce was easily faster than everything else (by 10x-100x). the sample code i used is hosted over on http://sqlceperformancedemo.codeplex.com/
/ gabe
Post a Comment