Download presentation
Presentation is loading. Please wait.
Published byReginald Green Modified over 8 years ago
1
SQL Dev Tips for Small Workstations How to develop SQL on small dev workstations when prod is huge. Kevin Kline and Aaron Bertrand SQL Sentry
2
Agenda We’re giving you three speedy and useful tips in the next few minutes that will make your development efforts more realistic and representative of production-like environments. 1.Mimic Production Behavior 2.Proper Handling for Caches 3.Observe Behavior Changes
3
Dev workstations are usually nothing like production: 1.Build representative data when you can. 2.Build a stats-only database (a.k.a. db clone) for smaller dev environments 3.Ensure important settings are the same. 4.Simulate equivalent hardware: DBCC OPTIMIZER_WHATIF. First - Mimic Production Behavior Demo: Mimicking Prod
4
Code to clear the caches*: Clear dirty pages: CHECKPOINT Clear the plan cache: DBCC [FreeProcCache | FreeSystemCache | FlushProcInDB( ) ] Clear the data cache, when needed: DBCC DROPCLEANBUFFERS Second - Proper Handling For Caches
5
Code to set measurements: SET STATISTICS [TIME | IO] SET SHOWPLAN [TEXT | XML] or Graphic Execution Plans Code for Dynamic Management Views (DMV) checks. Query info – sys.dm_exec_plan_attributes, sys.dm_exec_sql_text System info – sys.dm_os_performance_counters, sys.dm_os_wait_stats Query info – sys.dm_exec_requests Index info – sys.dm_db_index_usage_stats, sys.dm_io_virtual_file_stats Third – Observe Behavioral Changes Demo: SQL Observations
6
Summary Three steps to achieving production-live behavior in a small SQL Server development environment: 1.Mimic Production Behavior, via DBCC OPTIMIZER_WHATIF. 2.Proper Handling for Caches, via DBCC cache controls. 3.Observe Behavioral Changes, via SET statements, SSMS, and DMVs. Get the demo scripts at _________________. Q&A: Aaron (abertrand@sqlsentry.com), Kevin (kekline@sqlsentry.com)abertrand@sqlsentry.comkekline@sqlsentry.com Twitter: @AaronBertrand and @KEKline
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.