Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL Server Optimizing Query Plans

Similar presentations


Presentation on theme: "SQL Server Optimizing Query Plans"— Presentation transcript:

1 SQL Server 2014 - Optimizing Query Plans
Pooja Harjani | Senior Program Manager, SQL Server

2 Meet Pooja Harjani | ‏@pvaswani
Senior Program Manager, SQL Server Worked on features in Query Processing area in SQL Server 2012 and in In-Memory OLTP technology in SQL Server 2014 Release Manager for SQL Server 2014 Currently working on Query Processing area and In-Memory OLTP technology in SQL Server Contributed to white papers on partitioning and In-Memory OLTP in SQL Server

3 Course Topics SQL Server 2014 - Optimizing Query Plans
01 | Background on SQL Server Query Optimizer (QO) 02 | New Cardinality Estimator (CE) 03 | Incremental Statistics

4 Setting Expectations Target Audience
DBAs with a background in on-premises SQL Server Developers with a background in developing for SQL Server Suggested Prerequisites/Supporting Material Suggested Reading: Optimizing your query plans with SQL Server 2014 Cardinality Estimator -

5 Join the MVA Community! Microsoft Virtual Academy
Free online learning tailored for IT Pros and Developers Over 1M registered users Up-to-date, relevant training on variety of Microsoft products

6 Pooja Harjani | Senior Program Manager, SQL Server
01 | Background on SQL Server Query Optimizer (QO) Pooja Harjani | Senior Program Manager, SQL Server

7 Module Overview About Query Optimizer (QO) Cardinality Estimation (CE)
Statistics

8 About Query Optimizer (QO)
The QO takes a user query and returns a query plan Rule-based optimizer Estimates cost using estimates of the size of a given sub-result (Cardinality Estimates) First bullet supporting points: Rearranges the order of operations Chooses logical and physical operators Maintains query semantics (many plans have the same semantics)

9 Cardinality Estimation
Estimates the number of rows returned by each operation Relies on Basic assumptions (independence, uniformity, etc) Statistics

10 Statistics Basic information about the distribution of the data in the table Used extensively by Cardinality Estimator (CE) Freshness matters

11 Basic Statistics Terms
Density = 1 / Distinct Value Count Frequency = Row Count * Density Selectivity of P= Row Count satisfying P/ Row Count

12


Download ppt "SQL Server Optimizing Query Plans"

Similar presentations


Ads by Google