When you first run the SqlCeCommand instance, the SQL CE engine needs to create a query plan for this query. The first execution will always be slower than subsequent executions. You can also reuse command instances and invoke Prepare on SqlCeCommand to flag the query plan generation command.
source
share