Checking the Page Life Expectancy (PLE) counter in SQL Server is one of the greatest ways to identify memory consumption issues. Page Life Expectancy is the number of seconds a page will stay in the buffer pool without references. If PLE value is too low its indicates that data pages are being flushed from the buffer pool too quickly. The longer a page can stay in the buffer pool and be read from memory the better. We all know that having to constantly go back to disk to fetch data is costly. The minimum recommended value of the PLE counter is 300 seconds (5 minutes).
Here is the query that will return Page Life Expectancy in seconds, minutes and hours.
1 2 3 4 5 6 7 8 |
SELECT [object_name] ,[counter_name] ,[cntr_value] AS Seconds ,[cntr_value]/ 60 AS Minutes ,[cntr_value]/ 3600 AS Hours FROM sys.dm_os_performance_counters WHERE [object_name] LIKE '%Manager%' AND[counter_name] = 'Page life expectancy' |
Leave a Comment