Are You There, DBA? It’s Me, The App Developer.

Slides:



Advertisements
Similar presentations
© 2012 Entrinsik, Inc. Informer Administration Exploring the system menu and functions PRESENTER: Jason Vorenkamp| Informer Software Engineer| March 2012.
Advertisements

Backup, Integrity Check and Index and Statistics Maintenance
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
Bruce Armstrong TeamSybase
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Administration etc.. What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour.
Working With Large Datasets in Corporate Settings Ed Bassin
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
2 Avoiding Stored Procedure Recompiles Dr Greg Low Managing Director Solid Q Australia Session Code: DAT454.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
Introduction to Database Development Using Borland Data Providers 2128 Martin Rudy.
Performance Dash A free tool from Microsoft that provides some quick real time information about the status of your SQL Servers.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
BA372 Stored Procedures and Triggers Lab. What needs to be done to change a customer’s credit limit? Who am I? May I? Do it Log it Display A database.
Improving Database Performance Derrick Rapley
By Shanna Epstein IS 257 September 16, Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.
Sofia, Bulgaria | 9-10 October The Query Governor Richard Campbell Stephen Forte Richard Campbell Stephen Forte.
SQL School is strongly committed to provide COMPLETE PRACTICAL REALTIME Trainings on SQL Server Technologies – Dev, SQL DBA, MSBI (SSIS, SSAS, SSRS) and.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
A deep dive into SQL Server Plan Cache Management.
Session Name Pelin ATICI SQL Premier Field Engineer.
SSIS Templates, Configurations & Variables
An introduction to Wait Statistics
How to tune your applications before moving your database to Microsoft Azure SQL Database (MASD) OK, you've jumped into your Azure journey by creating.
Presented By: Jessica M. Moss
What Is The SSIS Catalog and Why Do I Care?
Curacao SQL Saturday June 11, 2016
Reverse Engineering The Database
Troubleshooting SQL Server high CPU usage
memcached: an in-depth discussion about caching.
Stored Procedures – Facts and Myths
6/16/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Informatica PowerCenter Performance Tuning Tips
Parameter Sniffing in SQL Server Stored Procedures
SQL Server Monitoring Overview
loooooooooooooong Introduction!
Deploying and Configuring SSIS Packages
Building Modern Transaction Systems on SQL Server
Introduction to Execution Plans
Performance Monitoring Using Extended Events, DMVs & Query Store
Query Execution Expectation-Reality Denis Reznik
Weird Stuff I Saw While ... Supporting a Java Team
Save Time & Resources: Job Performance Tuning Strategies
Query Optimization Techniques
Migrating your SQL Server Instance
Stop Wasting Time & Resources: Performance Tune Your Jobs
TEMPDB – INTERNALS AND USAGE
When I Use NOLOCK AND OTHER HINTS
Transact SQL Performance Tips
Oracle Memory Internals
Parameter Sniffing: the Good, the Bad, and the Ugly
Go, go Query Store! Gail Shaw.
Parameter Sniffing: the Good,the Bad, and the Ugly
Parameter Sniffing: the Good, the Bad, and the Ugly
Summit Nashville /3/2019 1:48 AM
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Jean Joseph DBA\DEVELOPER
SQL Server Query Design and Optimization Recommendations
Introduction to Execution Plans
Query Optimization Techniques
Michelle Haarhues Keeping up with SSMS.
Introduction to Execution Plans
Using wait stats to determine why my server is slow
Efficient and Effective coding of stored procedures
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Presentation transcript:

Are You There, DBA? It’s Me, The App Developer

Who am I? Jacquelyn Keeper C#, ASP.NET, SQL Server, Oracle JacquelynKeeper@ gmail.com Strategies Common roadblocks

DBA vs. Developer Relationship can be contentious Blame game Us or them Work as a team or everyone goes down with the ship. Us v them Dba dev roles users

Developers: How to Ask For Data Provide the query Reasonable result size Specify output format Destructive or long-running query? Warn the DBA! Use app name in connection string

DBAs: How to Provide Data No screenshots Readable format Takeaway

Request/Provide Data Takeaways Few minutes work up front No wasted time or emails

Breaking Out of Your Bubble What causes DBAs and Devs to observe different results?

Parameter Sniffing When a stored procedure is compiled, SQL Server uses the parameter values to create an execution plan.

Parameter Sniffing Demo

Parameter Sniffing – Demo Screenshot “USA” as First Parameter “Canada” as Second Parameter

Parameter Sniffing – Demo Screenshot “Canada” as First Parameter “USA” as Second Parameter

Parameter Sniffing - Takeaways Performance can vary significantly depending on your parameter values Make sure DBA and Developer use the same parameter values when troubleshooting

Breaking Out of Your Bubble - Take 2 What causes DBAs and Devs to observe different results?

Different Clients, Different Plans Even when executing a stored procedure using the same parameter values, an application may get a different query plan than SSMS. Different clients, different plans? Different plans, different results?

Default Cache Key Settings Applications using ADO.NET, ODBC, or OLE DB SSMS SQLCMD, BCP, SQL Server Agent QUOTED_IDENTIFIER ON OFF ARITHABORT Source: Slow in the Application, Fast in SSMS? Understanding Performance Mysteries, http://www.sommarskog.se/query-plan-mysteries.html

Query Plan Cache Demo Clear query cache. Run proc from SSMS. Show query cache. Rerun proc from SSMS with different parameter value. Show query cache. Run proc from SSMS. Show query cache.

Query Plan Cache – Demo Screenshot Stored procedure executed twice, only 1 plan in cache

Query Plan Cache – Demo Screenshot Run stored procedure from application, 2 plans in cache

Detour – My demos aren’t working?!? Plan cache getting cleared within in a few seconds! Check SQL Server error log KB 918483 might be affecting you too! https://support.microsoft.com/en-us/help/918483/how-to-reduce-paging-of-buffer-pool-memory-in-the-64-bit-version-of-sq Lock pages in memory option

Getting the Execution Plan Get the actual plan, not the estimate Use Profiler to capture the application query plan Using Profiler can cause performance issues!

Actual Execution Plan Demo Have a template ready with the correct events selected

Actual Execution Plan – Demo Screenshot

Reading the Execution Plan SQL Sentry Plan Explorer Integrates with SSMS https://www.sentryone.com/plan-explorer

Techniques for troubleshooting together Tips & Tricks Techniques for troubleshooting together

Statistics DBA Consider a weekly or monthly job to update statistics. Developer Some tables may need frequently updated statistics.

Compare Execution Plans SSMS Application

Query Types Stored Procedures Use whenever possible Easy to change Dynamic SQL Sometimes unavoidable Consider using snippets

Get Creative Option Recompile Plan Guides Partition Meetup Force a good plan to be used Option Recompile Work around parameter sniffing Partition Force queries to use a single partition Meetup In person brainstorming session

Learn from each other!

DBAs & Developers… this is the beginning of a beautiful friendship!

Questions? JacquelynKeeper@gmail.com ?

I made use of the following resources: Credits I made use of the following resources: Presentation template by SlidesCarnival The truly excellent article “Slow in the Application, Fast in SSMS? Understanding Performance Mysteries” by Erland Sommarskog http://www.sommarskog.se/query-plan-mysteries.html