Connect with life Nauzad Kapadia Quartz Systems

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
Windows Azure Connect Name Title Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
Ian Ellison-Taylor General Manager Microsoft Corporation PC27.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”
demo while !EmptyList Execute(next WorkItem) while !EmptyList Execute(next WorkItem) Work items are executed one at a time within a single.

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Advanced SQL Azure Database Name Title Microsoft Corporation.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Sr. Dir. – Systems Architecture Inlet Technologies.
Connect with life Praveen Srivatsa Founder and CEO – AstraSoft.NET Vinod Kumar Technology Evangelist – Databases and BI.

IoCompleteRequest (Irp);... p = NULL; …f(p);
Ctrl-K, X Ctrl-K, S
MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Возможности Excel 2010, о которых следует знать
Title of Presentation 11/22/2018 3:34 PM
Office Mac /30/2018 © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 12/2/2018 3:48 PM
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Connect with life Nauzad Kapadia Quartz Systems

Session Objectives And Key Takeaways Session Objectives: Dive into the query performance and tuning capabilities in SQL Server Demonstrate common tuning and troubleshooting techniques using SQL Server Disclaimer: Query Tuning is a deep & broad topic – won’t cover everything Key Takeaways: SQL Server has wealth of capabilities Get a refresher on certain fundamental concepts Common pitfalls to avoid and optimization techniques

Factors Affecting Performance? Application Design 3 tier architecture facilitates caching, connection pooling. Partitioning tables and databases Not mixing logs and database on the same disk Database Design Normalization of database structure, choosing indexes. Microsoft SQL Server Setup. Affinity mask, lightweight pooling, max worker threads and degree of parallelism. Hardware

Indexes Scan and Seek * Clustered and non-clustered indexes Seekable Predicates * Single column Indexes Multi Column Indexes Covered Columns A Clustered index covers all columns A non-clustered index covers only key columns A non-clustered index on a table with a clustered index covers the clustered index key

Example : Covered Columns CREATE TABLE T_heap (a int, b int, c int, d int, e int, f int) CREATE INDEX T_heap_a ON T_heap (a) CREATE INDEX T_heap_bc ON T_heap (b, c) CREATE INDEX T_heap_d ON T_heap (d) INCLUDE (e) CREATE UNIQUE INDEX T_heap_f ON T_heap (f) CREATE TABLE T_clu (a int, b int, c int, d int, e int, f int) CREATE UNIQUE CLUSTERED INDEX T_clu_a ON T_clu (a) CREATE INDEX T_clu_b ON T_clu (b) CREATE INDEX T_clu_ac ON T_clu (a, c) CREATE INDEX T_clu_d ON T_clu (d) INCLUDE (e) CREATE UNIQUE INDEX T_clu_f ON T_clu (f)

Indexing Bookmark Lookups * Bookmark lookups are expensive Index Cost * Only one clustered index allowed per table A Clustered index is always unique even if it is not explicitly specified so. Create a PRIMARY KEY by adding a NONCLUSTERED keyword. Make non-clustered indexes highly selectable.

Indexing – cont’d Index small fields. Avoid creating indexes on large string columns ALTER TABLE titles ADD hash_title AS CHECKSUM(title) CREATE INDEX hash_index ON titles(hash_title) SELECT * FROM titles WHERE title = 'Cooking with Computers: Surreptitious Balance Sheets' AND hash_title = CHECKSUM('Cooking with Computers: Surreptitious Balance Sheets')

Indexing – cont’d Pay attention to column order Drop or create indexes as needed

Plan Caching Adhoc plan caching * Autoparameterization * Forced Parameterization ALTER DATABASE SET PARAMETERIZATION FORCED; Use Prepared statements *

Stored Procedures Execution Plan Usage Keep them small Recompiles Causes Avoiding Analysis

Stored Procedure Recompile recommendations Avoid interleaving DDL and DML operations Fully qualify all references to SP Use KEEP PLAN/KEEP FIXEDPLAN option To avoid recompile, execute statements by using either of these Sub-procedures EXECUTE/sp_executesql Use table variable instead of temp table (New in Microsoft SQL Server 2000)

Transactions Keep them short Avoid external work inside the transaction such as Take care to avoid deadlocks Use a appropriate isolation level.

Best Practices LEARN T-SQL Avoid Cursors as far as possible Do you have missing indexes – Take the help of DTA Avoid joining tables on different data types For frequent computations create a calculated column It helps in column statistics which SQL Server can use in optimizing the query. Don’t use unqualified object names

© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.