hossein ab hossein ab - 1 year ago 88
SQL Question

sql database in ef

i use ef in wpf application

i want to avoid accessing to database structure and data after installing app on customers system.

i used sql compact edition but it is very slow than sql express,
then i used sql express instead of ce edition but it's .mdf file can attach to an instance sqlserver simply and access to its structure and data.

(in my app confidentiality of database and speed of responsiveness are very important)

please tell me your best solution:

Answer Source

According to your security constrain,I think the best fit is SQL CE.But you're worrying about the performance of the app.That is not due to database provider.That is due to issues of EF queries on your app.So my suggestion is to optimise those queries. Firstly you have to identify the very slow one,then next one and so on.

You have to consider the below mentioned items when you do the optimisation.

  1. Cold vs. Warm Query Execution
  2. Caching in the Entity Framework
  3. Autocompiled Queries
  4. NoTracking Queries
  5. Query Execution Options
  6. Design time performance considerations
  7. Loading Related Entities
  8. Other Considerations
  9. Investigating Performance

You can get huge knowledge about above topics using this article : Performance Considerations for Entity Framework

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download