21
SQL Server 2016 Performance Tricks You Need to Know Pinal Dave http:// blog.sqlauthority.co m

Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Embed Size (px)

Citation preview

Page 1: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

SQL Server 2016Performance Tricks You Need to Know

Pinal Davehttp://blog.sqlauthority.com

Page 2: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Agenda

Preventive Measures

Getting Started with Waits

Practical Performance Issues

Resources3

12

>

1

Page 3: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Common Performance Problems

Slow Application Response TimeFrequent TimeoutsIntermediate Performance ProblemsData & Workload Growth

Page 4: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

No One Wants Slow Running Application

Page 5: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Real World Scenario

Courtesy: All icons from www.flaticon.com

SQL Server 2012

Slow Applica

tion

Page 6: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Our application is running slow.

Would you please fix it?

We did everything possible to

improve performance.

What next?

Sure, Boss!

Page 7: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

We should upgrade to SQL Server 2014 or SQL Server 2016

Why?

Page 8: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Long Running Query

Q: What is the first thing comes to your mind when you see a query running for a long time?

Please, Help me!

Page 9: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Demo

Page 10: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Now let’s upgrade to

latest version

Why?Do queries

run faster on latest

version?

Page 11: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Query Runs Faster in Latest Versions

Q: Why do some queries runs faster in the latest version of SQL Server?

What is your answer based

on demo?

Page 12: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

What we have seen so far…

Higher Compatibility Level +

Latest Cardinality Estimation =

Better Performance

Page 13: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Cardinality Estimation

• Predicts rows your query likely to return• Helps query optimizer to generate the

optimal plan

• Latest CE is more accurate• Latest CE More Optimal Query Plan

Latest CE is a good thing

Page 14: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Compatibility Level

• Provides partial backward compatibility

• SS 2016 onwards new features are tied with new compatibility level

• Compatibility level includes many features including cardinality estimation

Latest CL is the most efficient

Page 15: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Demo

Page 16: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

• Latest compatibility level offers the best performance

Great learning so far! Sure

I wish he considers my promotion as

well

Page 17: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Let us differ it to next review cycle

What about my promotion?

Whhaaaat…?

I knew it!

Page 18: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Demo

Page 19: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

http://go.sqlauthority.com http://blog.sqlauthority.com

Resources

www.idera.com

Page 20: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

Purchase SQL Diagnostic Manager and get SQL Doctor FREE!

Limited Time Offer!

Page 21: Geek Sync I SQL Server 2016 Performance Tricks You Need to Know

www.idera.com

Try Any of Our Tools Free!