title: SQL Server Express Localdb; Opening initial connection is too slow
body: <p>I am developing a single user desktop application based on Entity Framework, I am using SQL Server Express Localdb for application database since it is lightweight and very easy to install on end-user PC, but I have some issues that concerns me, I have populated the database with some test data around 1 million records (Actually the end-user data will not reach to that amount of records in many years but I did it as future proof) to see how fast it is, regarding the performance, it is acceptable but what really concerns me is that the first connection to the database is getting very slow as the database size grows, I can clearly see that for 1 million records of data and database size of around 340MB it is taking more than 20 seconds for the application to open the first connection which is not acceptable for end-user to wait so much until the application start.</p>
  
  <p>During the time the connection is being opened, I can see the heavy use of hard disk by LocalDb service, which makes me wonder if there is an with issue with Localdb itself or I am missing something. I know that Localdb was built for development purposes but for me right now it is the best solution for applications with embedded database that are being developed on Entity Framework.</p>
  
  <p>Is there any solution or tweak to make the initial connection faster?</p>