Power Query & Database Tuning

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.
© 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: 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.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training. Windows ® 7 Compatibility Installer Detection.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Announcing Demo Announcing.
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.
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.
Connect with life Connect with life
© 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: 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.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
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.

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.
Running Reporting Services in SharePoint Integrated Mode: How and Why
6/12/ :53 PM DEV311 Deep Dive into Microsoft Visual Studio Team Foundation Server 2010 Reporting Steven Borg, Principal ALM Consultant Northwest.
6/19/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
8/8/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Microsoft Dynamics NAV 2018 – what’s new
Возможности Excel 2010, о которых следует знать
Title of Presentation 11/22/2018 3:34 PM
11/22/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
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
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
12/5/ :14 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
1/3/2019 1:21 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
TechEd /18/2019 2:43 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /23/2019 7:16 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Building SaaS Solutions on Windows Azure
Silverlight Debugging
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.
4/27/17, Bell #8 What amount of net pay has been earned this period?
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
TechEd /28/2019 7:58 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Enriching your BI Semantic Models with Data Analysis Expressions (DAX)
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Lap Around the Windows Azure Platform
Running Reporting Services in SharePoint Integrated Mode: How and Why
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
7/5/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
What’s New in Visual Studio 2012 for Web Developers
Presentation transcript:

Power Query & Database Tuning Ernest Ostrander Power Query & Database Tuning aka Making Sense of Statistics IO

DBA Track

Ernest Ostrander About me… Currently living in Bogota, Colombia Using SQL Server since SQL Server 7.0 Certified in SQL Server 2012/2014. Let’s connect: https://www.linkedin.com/in/ernest-ostrander-1913b912/

Sample Tuning Technique: Query Folding What is Query Folding? Combining This: UPDATE dbo.Customers SET CustomerName = rtrim(ltrim(CustomerName)) SET CustomerCity = rtrim(ltrim(CustomerCity)) Into This: UPDATE dbo.Customers SET CustomerName = rtrim(ltrim(CustomerName)) ,CustomerCity = rtrim(ltrim(CustomerCity)) 2 Table Scans 1 Table Scan

Sample Tuning Technique: Refactoring Refactoring code can mean many things… Use a #temp table to replace commonly used inputs. Use EXISTS() clause to replace more expensive subqueries or outer joins. Use @Variables to store intermediate results and “short circuit” execution.

…Tuning Technique: Tracking STATISTICS IO Characteristics of These Tuning Opportunities? No one query shows up on a hit parade of evil queries. Looking at execution plans won’t help. Adding indexes likely just disguises the core issue. Manual detection is key. This technique is for monitoring progress toward a solution, not detecting opportunities.

Tracking STATISTICS IO? Measurement Technique: Statistics IO Limitations of Statistics IO Does not report statistics for operations inside function calls. Pre-SQL2012 SP2, reports incorrect results unless explicitly declaring MAXDOP = 1

Tracking Statistics IO How does this technique help? It helps interpret this……. Table 'StoredProcAudit'. Scan count 0, logical reads 3, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (0 row(s) affected)   Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (1 row(s) affected) Table 'PurchaseOrderDetail'. Scan count 5, logical reads 34763, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5245, logical reads 16378, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 0, logical reads 15735, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatusDetail'. Scan count 1, logical reads 57, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 1, logical reads 11283, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatus'. Scan count 1, logical reads 2899, physical reads 1, read-ahead reads 2441, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 4, logical reads 70, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 2, logical reads 5367, physical reads 2, read-ahead reads 16, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (15 row(s) affected) Table 'PurchaseOrder'. Scan count 1, logical reads 2517, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'InvoiceDetail'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Invoice'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 16, logical reads 11346, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatus'. Scan count 1, logical reads 2899, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 0, logical reads 1063773, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 354591, logical reads 2188140, physical reads 471, read-ahead reads 10820, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 11401, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 413674, physical reads 5852, read-ahead reads 73125, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'InvoiceDetail'. Scan count 2, logical reads 4, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 4, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 88, logical reads 16816, physical reads 1258, read-ahead reads 15558, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 420159, physical reads 886, read-ahead reads 24004, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 5, logical reads 2765, physical reads 2, read-ahead reads 732, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (602 row(s) affected) Table 'PurchaseOrderDetail'. Scan count 5, logical reads 220255, physical reads 672, read-ahead reads 193204, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 3, logical reads 2526, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 24, logical reads 12056, physical reads 547, read-ahead reads 11509, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 3, logical reads 10790, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 197155, physical reads 2, read-ahead reads 188153, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 5, logical reads 2765, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 413339, physical reads 4854, read-ahead reads 378305, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatus'. Scan count 1, logical reads 2905, physical reads 3, read-ahead reads 2345, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (2576 row(s) affected) Table 'PurchaseOrder'. Scan count 1, logical reads 34318, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5245, logical reads 47278, physical reads 3, read-ahead reads 192, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatusDetail'. Scan count 5, logical reads 196, physical reads 2, read-ahead reads 133, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (2 row(s) affected) Table 'Oracle_PurchaseOrder'. Scan count 1, logical reads 412116, physical reads 1, read-ahead reads 409184, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (3 row(s) affected) Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 413304, physical reads 14874, read-ahead reads 300851, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatus'. Scan count 1, logical reads 4, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 5, logical reads 37767, physical reads 0, read-ahead reads 34205, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 3, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 1, logical reads 5, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderExportStatusDetail'. Scan count 1, logical reads 3, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Vendor'. Scan count 6, logical reads 1527, physical reads 1, read-ahead reads 381, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'CCluster'. Scan count 2, logical reads 4, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderStatus'. Scan count 2, logical reads 4, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Site'. Scan count 5, logical reads 1444, physical reads 3, read-ahead reads 1265, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ShipLocation'. Scan count 3, logical reads 9, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 413139, physical reads 4220, read-ahead reads 372663, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 448863, logical reads 4190512, physical reads 1559, read-ahead reads 34165, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Project'. Scan count 6, logical reads 70737, physical reads 3, read-ahead reads 67549, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 396, logical reads 783016, physical reads 97656, read-ahead reads 739560, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 48930, logical reads 2821128, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderType'. Scan count 1, logical reads 2, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 23960681, physical reads 149799, read-ahead reads 434985, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectMaterial'. Scan count 2450026, logical reads 10069663, physical reads 58967, read-ahead reads 5252, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 413239, physical reads 0, read-ahead reads 409052, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (337417 row(s) affected) Table 'ProjectDriver'. Scan count 5, logical reads 364948, physical reads 2, read-ahead reads 364335, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriverVendor'. Scan count 1717298, logical reads 13768604, physical reads 45127, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 5424531, logical reads 52788004, physical reads 91912, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 0, logical reads 18228272, physical reads 0, read-ahead reads 39, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 96, logical reads 228648, physical reads 24165, read-ahead reads 204483, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (2975190 row(s) affected) Table 'Oracle_PurchaseOrder'. Scan count 1, logical reads 412116, physical reads 1, read-ahead reads 412092, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 1, logical reads 2517, physical reads 0, read-ahead reads 441, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 0, logical reads 1539, physical reads 3, read-ahead reads 35, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Project'. Scan count 2, logical reads 64696, physical reads 3, read-ahead reads 34561, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 9, logical reads 188, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (99543 row(s) affected) Table 'Vendor'. Scan count 2, logical reads 762, physical reads 1, read-ahead reads 381, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (55 row(s) affected) ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table '#newpos_____________________________________________________________________________________________________________000000000187'. Scan count 1, logical reads 3681, physical reads 0, read- Table 'PurchaseOrderDetail'. Scan count 5, logical reads 196776, physical reads 472, read-ahead reads 160599, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_PurchaseOrder'. Scan count 5, logical reads 413449, physical reads 528, read-ahead reads 412142, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriverVendor'. Scan count 1, logical reads 3736323, physical reads 31058, read-ahead reads 484, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 3388032, logical reads 20198017, physical reads 18019, read-ahead reads 7132, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriver'. Scan count 5, logical reads 365068, physical reads 1, read-ahead reads 363719, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectMaterial'. Scan count 6, logical reads 155012, physical reads 0, read-ahead reads 148514, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 1843350, logical reads 10700733, physical reads 746, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 5, logical reads 3063, physical reads 2, read-ahead reads 2566, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (219 row(s) affected) Table 'Worktable'. Scan count 2, logical reads 871558, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 3260079, physical reads 4841, read-ahead reads 207566, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 337, logical reads 29608, physical reads 3087, read-ahead reads 28025, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriver'. Scan count 5, logical reads 364748, physical reads 1, read-ahead reads 363737, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriverVendor'. Scan count 6, logical reads 78075, physical reads 0, read-ahead reads 43816, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 11218254, physical reads 19317, read-ahead reads 201814, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 5, logical reads 3063, physical reads 1, read-ahead reads 1059, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (148578 row(s) affected) Table 'ProjectMaterial'. Scan count 6, logical reads 154814, physical reads 0, read-ahead reads 150541, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 6, logical reads 4052795, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 196138, physical reads 725, read-ahead reads 150135, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 5, logical reads 3063, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (500677 row(s) affected) Table 'Worktable'. Scan count 2, logical reads 1444, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Oracle_ItemCrossRef'. Scan count 5, logical reads 96, physical reads 0, read-ahead reads 96, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (346 row(s) affected) Table 'ProjectMaterial'. Scan count 6, logical reads 154749, physical reads 0, read-ahead reads 142176, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrder'. Scan count 732341, logical reads 2380972, physical reads 0, read-ahead reads 41, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectMaterial'. Scan count 10, logical reads 28797, physical reads 1, read-ahead reads 8878, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 2, logical reads 11646, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Material'. Scan count 5, logical reads 2326, physical reads 3, read-ahead reads 2118, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 92, logical reads 37912, physical reads 4395, read-ahead reads 33517, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 247350, physical reads 24, read-ahead reads 189235, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriverVendor'. Scan count 6, logical reads 39065, physical reads 0, read-ahead reads 39210, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (2802 row(s) affected) Table 'Worktable'. Scan count 2, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectDriver'. Scan count 5, logical reads 364948, physical reads 0, read-ahead reads 363360, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 188934, physical reads 18, read-ahead reads 187942, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 337, logical reads 29248, physical reads 3021, read-ahead reads 27563, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 40871, physical reads 0, read-ahead reads 17913, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectMaterial'. Scan count 5, logical reads 143994, physical reads 0, read-ahead reads 142155, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Worktable'. Scan count 3, logical reads 3771262, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'PurchaseOrderDetail'. Scan count 5, logical reads 4604169, physical reads 66, read-ahead reads 132964, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (37 row(s) affected) Table 'Vendor'. Scan count 2, logical reads 760, physical reads 1, read-ahead reads 381, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Workfile'. Scan count 14, logical reads 7224, physical reads 338, read-ahead reads 6886, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'ProjectMaterial'. Scan count 1, logical reads 1289010, physical reads 139, read-ahead reads 168499, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Vendor'. Scan count 2, logical reads 766, physical reads 0, read-ahead reads 3, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (614793 row(s) affected) Table 'PurchaseOrder'. Scan count 1, logical reads 2782, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'Vendor'. Scan count 1, logical reads 6113, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (137015 row(s) affected) Table 'PurchaseOrderDetail'. Scan count 1, logical reads 31733, physical reads 0, read-ahead reads 10063, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. (2865 row(s) affected) Table 'Oracle_Vendors'. Scan count 1, logical reads 2920, physical reads 0, read-ahead reads 2920, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'StoredProcAudit'. Scan count 0, logical reads 3, physical reads 3, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Tracking STATISTICS IO Real World Example: 8 runs of query optimization

Tracking STATISTICS IO DEMO

Tracking STATISTICS IO Power Query…

Power Query: Language Flow Evaluation is like a stored procedure with no body. This Power Query expression (ignore syntax specifics): let Source = Sql.Database("localhost", "AdventureWorksDW2012"), DimEmployee = Source{[Schema="dbo",Item=“DimEmployee"]}[Data], DimRaise = DimEmployee{Salary}*1.05, in DimRaise Translates (ignore syntax specifics) into this: CREATE PROCEDURE PowerQuery @Source = nvarchar(File) ,@Employees = Source{[Salary]} ,@Process = @Employees.Salary * 1.05 RETURNS @Process

Tracking STATISTICS IO DEMO

Tips and Tricks Leverage the UI 4/11/2019 10:43 PM Tips and Tricks Leverage the UI Generate steps using the UI, then tweak the code. Formatting is easier in the UI. Some things only work through the UI (“auto steps”). © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

Resources Install the Power Query Add-in (for Excel 2013 / Excel 2010) 4/11/2019 10:43 PM Resources Install the Power Query Add-in (for Excel 2013 / Excel 2010) http://www.microsoft.com/en-us/download/details.aspx?id=39933 Dive into the Language and Library Language reference: http://go.microsoft.com/fwlink/?LinkID=235475 Library reference: http://go.microsoft.com/fwlink/?LinkID=320634 Office help: http://go.microsoft.com/fwlink/?LinkID=398594 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

Resources Learning TechNet msdn http://channel9.msdn.com/Events/TechEd 4/11/2019 Resources Sessions on Demand http://channel9.msdn.com/Events/TechEd Learning Microsoft Certification & Training Resources www.microsoft.com/learning TechNet Resources for IT Professionals http://microsoft.com/technet msdn Resources for Developers http://microsoft.com/msdn © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.