views:

39

answers:

2

We have a database on a server with enough RAM to hold the entire db. Is there any merit and/or drawbacks to preloading the data into memory after a long period of inactivity?

Other factors during this nightly process: Balance data are recreated from another app/database/server. Indexes and stats get refreshed full backup to disk

then data would be preloaded.

A: 

If you have enough memory to hold the entire DB in it, you might as well do that, in particular if the server has no other responsibilities and will not require the RAM for anything else.

The advantage is that now fetching will not have to go to the hard drives (and even with SSDs, RAM is faster).

Oded
+3  A: 

It won't be removed from memory unless there is pressure, generally, and it's in use.

I'd be more concerned about the lag getting data into memory in the first place.... which is probably best done with a startup stored proc to update statistics with full scan for example.

Otherwise, let SQL Server do it own thing...

gbn
Except for high traffic during month end, this database could go from Friday afternoon to Monday morning with little activity.
Jeff O
@Jeff O: just schedule a stats update just before you expect load then eg 07:00. You may as well use the "preload" for something useful
gbn