I have a large (40 Mo) SDF database.
Some queries are very long, but can become quick after some time.
I would like to try to tidy up my indexes but I only find information for SQL Server and not for SQL CE.
I have a large (40 Mo) SDF database.
Some queries are very long, but can become quick after some time.
I would like to try to tidy up my indexes but I only find information for SQL Server and not for SQL CE.
Not exactly sure what sort of "tidying" you think needs to be done - the index won't be holding unnecessary records or anything in it. If you simply want to recover potentially empty space in the database (indexes and tables), you can use the either the Compact or Shrink methods in the SqlCeEngine class.
On the first execution of a SqlCeCommand instance the SQL CE engine needs to generate a query plan for that query. The first execution will always be slower then subsequent executions. You can also re-use command instances and call Prepare on the SqlCeCommand to mark the command for query plan generation.