Monday, February 13, 2012

App_Data vs SQLEXPRESS performance?

Hi all,

Just wondering if there are any performance differences with having your database file in the App_Data folder vs having it directly on SQLEXPRESS.

Cheers,

Simon

Yes, but not much of one in most cases. If it's in App_Data with an autoattach, the database will be attached when it first accessed, which will delay the first request slightly. It will then stay attached for subsequent accesses. Eventually if there are no more accesses, the system will unattach it to conserve resources, I think it's between 5 and 30 minutes, but could be wrong.

In any case, the performance difference is slight, and the auto attaching and unattaching will help free memory and resources for the other applications that may be running on that server when the database isn't being used. Extremely nice for both infrequent database applications (Low resources), and high usage database applications (Since the database will always stay attached).

|||Great thanks for the detailed reply Motley! I think I'll migrate my db into the App_Data folder now =)

Cheers

No comments:

Post a Comment