SQL Server 2014 - Optimizing Query Plans Pooja Harjani | Senior Program Manager, SQL Server
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
Course Topics SQL Server 2014 - Optimizing Query Plans 01 | Background on SQL Server Query Optimizer (QO) 02 | New Cardinality Estimator (CE) 03 | Incremental Statistics
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 - http://msdn.microsoft.com/en-us/library/dn673537.aspx
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
Pooja Harjani | Senior Program Manager, SQL Server 01 | Background on SQL Server Query Optimizer (QO) Pooja Harjani | Senior Program Manager, SQL Server
Module Overview About Query Optimizer (QO) Cardinality Estimation (CE) Statistics
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)
Cardinality Estimation Estimates the number of rows returned by each operation Relies on Basic assumptions (independence, uniformity, etc) Statistics
Statistics Basic information about the distribution of the data in the table Used extensively by Cardinality Estimator (CE) Freshness matters
Basic Statistics Terms Density = 1 / Distinct Value Count Frequency = Row Count * Density Selectivity of P= Row Count satisfying P/ Row Count