Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hitting the SQL Server “Go Faster” Button

Similar presentations


Presentation on theme: "Hitting the SQL Server “Go Faster” Button"— Presentation transcript:

1 Hitting the SQL Server “Go Faster” Button
Robert Douglas SQL Saturday Sydney 18th February 2017 Set expectation – Beginner level section – Plenty of time for Q&A at the end

2 Questions? Please make sure you visit our fantastic sponsors:

3 Robert Douglas Christchurch\Nelson SQL Server Users Group
BA(hons),MCTS, MCITP(2005/2008), MCSA(2012) Christchurch\Nelson SQL Server Users Group Blog: Consultant for SQL Services Limited Mention SQL Saturday SI – April 8th Want a job? #587 | Sydney 2017

4 The SQL Server “Go Faster” Button

5 The SQL Server “Go Faster” Button
There isn’t one. But…. There are a lot of knobs and switches that, when used appropriately, can make a huge difference! Today we will focus on low effort, high return. Individual query tuning is very resource intensive. 3rd party products and can’t directly adjust queries. Prioritizing your time to the best return for the business. Many consolidated databases on one server. Takeaways – a list of options you can apply to your own systems.

6 The SQL Server “Go Faster” Button
There isn’t one. But…. There are a lot of knobs and switches that, when used appropriately, can make a huge difference! Today we will focus on low effort, high return. Individual query tuning is very resource intensive. Many consolidated databases on one server. 3rd party products and can’t directly adjust queries. Prioritizing your time to the best return for the business. Takeaways – a list of options you can (test and then)apply to your own systems.

7 Where Can We Get Gains? Hardware Windows Configuration
Instance and Database Settings Maintenance Non-Code Changes. Run This: SQL Best Practices Analyzer (2012)

8 Hardware

9 Hardware It’s not cheating! Memory IO CPU
In fact often it is the best return on investment you can get. Memory IO CPU

10 Memory Set Maximum Server Memory appropriately Lock Pages in Memory
Ignore the (Very Old) pagefile = 1.5 x RAM recommendation.

11 IO (Not disk) Faster the better
64K Block Size and Disk Partition Alignment Dedicated drive Degree of Isolation. Remove IO bottleneck by decreasing load or increasing capacity.

12 CPU Cost Implications for Licensing Be Aware of Your Edition Limits
Some SQL Server Level Settings which effect this.

13 Network

14 Server Level

15 Windows Level Power Saving Settings Lock Pages in Memory
Bios and Windows Level Lock Pages in Memory Instant File Initialization(Perform Volume Maintenance Tasks) Data File Only Small Security Risk(But not really) Dedicate the Windows Server to SQL Server. Exclude SQL from applications using filter drivers(Such as Anti-Virus). Try and keep windows patches up to date. #587 | Sydney 2017

16 Virtual Machines Can perform (nearly) as well as a physical machine.
VM Memory to avoid ballooning Don’t overcommit resources Understand when and where the Virtual Machine can be moved. Understand what that means for licensing! Method of disk provisioning. Power Savings counts here too! #587 | Sydney 2017

17 SQL Server Level Settings
Optimize for Ad Hoc Workloads Compression Backup Compression Maximum Degree of Parallelism Cost Threshold of Parallelism. Trace Flags 1117,1118,3226,2371,4199….. Buffer Pool Extensions 1117 – grow files equally 1118 – mixed extents 3226 – remove backup success messages, 2371 – changes auto-update-stats thresholds. FROM % the size of table. 4199 – Turn on query optimizer changes by d #587 | Sydney 2017

18 Database Level

19 Database Settings Data and Log File Sizing Transaction Isolation Level
Autogrow should be a failsafe, but scope it accordingly. Avoid AutoShrink, and manual shrink unless you will never grow it again. VLF’s Find them with DBCC Loginfo 2014 does it better. Transaction Isolation Level Delayed Durability Buffer Pool Extensions #587 | Sydney 2017

20 TempDB Settings Multiple Data Files to avoid Contention
Presize and keep all files the same size. Review the filesize, particularly if you change your usage pattern. TraceFlags that can help: T1117 for equal file growth. T1118 for allocation of mixed extents. #587 | Sydney 2017

21 Ongoing Maintenance

22 Indexes and Maintenance
Backups What and how often? And who? Indexes can make a significant effect on individual queries They come at a cost – slower writes Apply the common sense filter to ‘missing index’ recommendations. Fill Factor Maintenance Rebuild or Re-Organize Update Statistics #587 | Sydney 2017

23 Questions? Please make sure you visit our fantastic sponsors:


Download ppt "Hitting the SQL Server “Go Faster” Button"

Similar presentations


Ads by Google