Download presentation
Presentation is loading. Please wait.
Published byAmber Harrison Modified over 8 years ago
1
Fixing Page Life Expectancy Steve Hood Email: Steve@SimpleSQLServer.com Blog: SimpleSQLServer.com
2
What is PLE? Duration in seconds data stays in memory References Monitor PLE in OS Perf CountersPLE in OS Perf Counters
3
It’s just a counter May always be low on OLAP environments Are you waiting on PAGEIOLATCH_SH? Monitor your Wait Stats Faster disks can help compensate References Monitor your Wait StatsWait Stats
4
Ideal Value Common advice of PLE > 300 is outdated Cache Size In GB / 4 * 300 Best generic formula References Jonathan Kehayias discusses the plan cache and PLEdiscusses the plan cache and PLE Comment discussion with Brent Ozar is as good at the article Jonathan Kehayias’s free book: Troubleshooting SQL ServerTroubleshooting SQL Server
5
Increase PLE More memory Query Tuning Query Justification Indexing Changes Data Cleanup
6
More Memory 64 GB in 2008 and 2012 Standard 128 GB in 2014 Standard Unlimited in Enterprise 768 GB is reasonable per physical box
7
What DBs are in cache? References Script: CacheSizeByDB
8
What Indexes are in Cache? References Script: CacheSizeByIndex (in speaker notes)
9
Finding Queries to Tune Look in the Proc Cache (not 100% reliable) Most Expensive Queries Index Usage in Proc Cache Server-Side Trace or Extended Events
10
Proc Cache Limitations Data since last compile Can monitor it better than that Only cacheable plans
11
Most Expensive Queries Uses Proc Cache For PLE focus on Physical Reads References Query Stats Monitoring – know your stats beyond your current cache Query Stats Monitoring Script: Most Expensive Queries (in speaker notes)
12
Index Usage in Proc Cache Uses Proc Cache Goes along with “What indexes are in cache” Gives Estimated IO cost Gives Seek and Scan Predicates References Script: Index Usage in Proc Cache (in speaker notes) Script: Table Usage in Proc Cache (in speaker notes)
13
Server-Side Trace or EE Duration over X seconds (5) Reads over X (100,000) References Tracing Introduction – Creating your first Server-Side Trace Tracing Introduction Reading Traces – Querying your Server-Side Trace Reading Traces Erin Stellato Making the Leap from Profiler to Extended EventsMaking the Leap from Profiler to Extended Events
14
How To Tune Beyond the scope of this presentation Execution Plans – Grant Fritchey Execution Plans Google SARGability BrentOzar.com SQLskills.com
15
Appropriate Queries? Did this query need to run? …in prod? …during peak hours?
16
Indexes – Drop Unused Data modifications pull data into cache Index maintenance pulls data into cache References Indexes – Unused and Duplicated
17
Indexes – Remove Dupes First couple key fields match Two indexes that could almost replace each other References Indexes – Unused and Duplicated
18
Indexes – Compression Enterprise only Some don’t compress at all Some compress by 90%
19
Data Cleanup Any data has potential to use cache If you can purge 25% of your data…
20
Fixing Page Life Expectancy Steve Hood Email: Steve@SimpleSQLServer.com Blog: SimpleSQLServer.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.