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: | Statistic | Description | | Cache Hit Ratio | | | Cache Flushes | This 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. |