We use SQL EXPRESS 2008; so we are limited to 1GB memory. The following query, lists the top databases using highest buffer cache. In my case, 2 insignificant databases are listed at the top. The critical database is number 3--and it performs slow. I don't mind the other 2 performing slow. They run a process twice a day, and do nothing. This heavy process blows-up the buffer cache. Is there a way to selectively flush the buffer cache? (I'm already using
DBCC FREESYSTEMCACHE('SQL Plans')
DBCC FLUSHPROCINDB ()
But they were NOT much useful.
------------------------------------------------------------------------------------------
SELECT db_name(database_id) as dbname,
count(page_id) as pages,
convert(decimal(20,2),count(page_id)*8192.0/1048576) as Mb
from sys.dm_os_buffer_descriptors
group by database_id
order by convert(decimal(20,2),count(page_id)*8192.0/1048576) desc
------------------------------------------------------------------------------------------