DBCC SQLPERF(LRUSTATS) 

Home
Up
What's New
DTS
SQL-DMO
SQL-NS
XP's
SQL Agent
Misc. Tools
Events
Articles
FAQ
Links
About...

DBCC SQLPERF(LRUSTATS) returns the LRU-MRU chain statistics. LRU stands for Last The same information is available via performance monitor counters.

The result set:

Statistic                         Value
-------------------------------- ------------------------
Cache Hit Ratio                   99.867287
Cache Flushes                     0.0
Free Page Scan (Avg)              0.0
Free Page Scan (Max)              0.0
Min Free Buffers                  331.0
Cache Size                        4362.0
Free Buffers                      217.0

Description of the statistic rows:

StatisticDescription
Cache Hit Ratio  
Cache FlushesThis counter is always zero
Free Page Scan (Avg)This counter is always zero
Free Page Scan (Max)This counter is always zero
Min Free Buffers 
Cache Size 
Free Buffers 

The table structure returned, has the following shape:

create table #lrustats
(
    [Statistic]    nvarchar(32) not null,
    [Value]        float not null
)

To populate the table use:

insert into #lrustats exec('dbcc sqlperf(lrustats) with tableresults, no_infomsgs')
select * from #lrustats

NOTE: Per SQL Server 2000 SP4 the DBCC SQLPERF(LRUSTATS, CLEAR) command is a NOP.

Questions or problems regarding this web site should be directed to Web Master.
Copyright © 1991-2005 SQLDev.Net. All rights reserved.
Last modified: 04/06/05.