MS SQL Cache
Posted on 2011-09-09
We purchased an application that has a Microsoft SQL 2005 database. Our in-house application has an API to interrogate the SQL database on the purchased application. Each morning the first transaction against the SQL database runs about 10 minutes. Each subsequent transaction runs between 0 and 4 seconds. Also if we reboot the server with the SQL database and try to hit it for the first time it also runs for about 10 minutes. The database is only about 100 MB in size.
My thought was that there may be some caching that occurs when the database is opened and that is why it runs very quickly after the first time. If this is the case, does it have some kind of lease, that expires overnight and must re-cache each morning? Is this something that can be set to re-cache only on server reboot.
This first database hit each morning is a pain!