I am trying to reduce the startup time of my EF-based application, but I find that I cannot reduce the amount of time taken for an initial read below 7 seconds even for a single
As per several comments, the reason the second runs so fast is due to the connection manager caching the connections. Which leads me to believe that getting that initial connection is the problem.
Things to try:
Change your connection string to use the IP address of the db server instead of it's name.
Connect to the database server using SQL Management Studio using the exact same credentials and mechanism. Do so from the machine that takes 7 seconds. Assuming that takes awhile, investigate to see what protocols are in use and ensure that the one you want is the first in the list.
Put a network analyzer on your machine and watch what it does.