JeffO
JeffO

Reputation: 8043

Any merit to preloading data into memory?

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.

Upvotes: 0

Views: 228

Answers (2)

gbn
gbn

Reputation: 432220

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...

Upvotes: 3

Oded
Oded

Reputation: 498972

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).

Upvotes: 0

Related Questions