Tuesday, March 27, 2012

Does SQL Server cache data?

Hello
I am using SQL Server 2000 SP4
I was going to test my SP in a "clear" environment so I executed
DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS
But it seems that still something is cached because if I restart server SP
takes longer time than just after clearing query plan caches.
Moreover could you help me with understanding What actually DBCC
DROPCLEANBUFFERS does? What are those clean buffers?
And if something else is really cached could you tell me how can I empty
that cache or see what is inside.
Thanks in advanceDBCC DROPCLEANBUFFERS will remove the buffers (pages) in cache that are clea
n. But you could have
dirty pages in cache (pages which has been modified since read into cache),
and those are not
removed from cache. To make sure you have no dirty pages in cache, execute C
HECKPOINT in the
database first.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Alexander Korol" <AlexanderKorol@.discussions.microsoft.com> wrote in messag
e
news:AC2F6CE8-3AE8-4513-A789-EC91AEA28819@.microsoft.com...
> Hello
> I am using SQL Server 2000 SP4
> I was going to test my SP in a "clear" environment so I executed
> DBCC FREEPROCCACHE
> DBCC DROPCLEANBUFFERS
> But it seems that still something is cached because if I restart server SP
> takes longer time than just after clearing query plan caches.
> Moreover could you help me with understanding What actually DBCC
> DROPCLEANBUFFERS does? What are those clean buffers?
> And if something else is really cached could you tell me how can I empty
> that cache or see what is inside.
> Thanks in advance|||Thanks a lot

No comments:

Post a Comment