Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Tools and Tips: From Accidental to Efficient Data Warehouse Developer (24 Hours of PASS: Summit Preview)

547 views

Published on

Tools and Tips: From Accidental to Efficient Data Warehouse Developer (Presented at 24 Hours of PASS: Summit Preview on July 20th 2017)

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

Tools and Tips: From Accidental to Efficient Data Warehouse Developer (24 Hours of PASS: Summit Preview)

  1. 1. Tools and Tips: From Accidental to Efficient Data Warehouse Developer Cathrine Wilhelmsen, Data Platform MVP Moderated by: Christian Reich
  2. 2. Session Description You have probably heard about the Accidental DBA, but what about the Accidental Data Warehouse Developer? We stumbled into the world of data warehousing, learned dimensional modeling and work with T-SQL and SSIS daily. We are masters of googling solutions to our problems and making sure our ETL processes run without errors. We deliver data to business users… and the more we deliver, the more they want. This is a good thing! But how do we keep up with the increased demand? You might not be able to rewrite your entire ETL process or change your team's processes over night, but there are many things you can do to increase your own productivity and become a more efficient and valuable Data Warehouse developer. In this session, I will show you some of what I have learned and discovered that has made me say "Oh wow! Why did I not know this yesterday!?" - including SSMS features, tools for query analysis and tuning, free tools and scripts, Biml for SSIS and even a couple of things I used to think were only useful for those scary DBAs.
  3. 3. cathrinew.net @cathrinew /in/cathrinewilhelmsen Cathrine Wilhelmsen Data Warehouse Architect and Developer PASS Community Evangelist and SQLSaturday Coordinator
  4. 4. Experience? T-SQL? SSIS? you…
  5. 5. once upon a time...
  6. 6. how I felt…
  7. 7. how I want to be...
  8. 8. ef·fi·cient Performing or functioning in the best possible manner with the least waste of time and effort
  9. 9. SSMS Queries Biml for SSIS what? DgRw
  10. 10. Tip #1: Visual Information
  11. 11. Connection Colors
  12. 12. Status Bar and Tab Text
  13. 13. Results in Separate Tab
  14. 14. Tab Groups - Vertical
  15. 15. Tab Groups - Horizontal
  16. 16. Split one query in two windows
  17. 17. Pin Tabs
  18. 18. Tip #2: Shortcuts
  19. 19. Query Shortcuts
  20. 20. Keyboard Shortcuts docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-keyboard-shortcuts Assign shortcuts you frequently use Remove shortcuts you accidentally click (no more "ooops")
  21. 21. Keyboard Shortcuts Cheat Sheet am2.co/shortcuts by Andy Mallon (@AMtwo)
  22. 22. HOME END PG UP PG DNCTRL ALT SHIFT TAB Magic keys!
  23. 23. CTRL R Show / Hide Query Results
  24. 24. ALTSHIFT ENTER Toggle Full Screen
  25. 25. TABCTRL Cycle through windows
  26. 26. CTRL U Change database
  27. 27. SHIFTALT Column / Multi-Line Editing
  28. 28. CTRL K CTRL C Comment Line CTRL K CTRL U Uncomment Line Comment / Uncomment
  29. 29. CTRL SHIFT V Last 20 text items copied are saved in memory Cycle through them to paste the text you need Clipboard Ring
  30. 30. Too many shortcuts? Use Quick Launch
  31. 31. Tip #3: Search in SSMS
  32. 32. Free Tool: Redgate SQL Search red-gate.com/products/sql-development/sql-search/
  33. 33. Free Tool: Redgate SQL Search
  34. 34. Redgate SQL Search ApexSQL Search SSMS Tools Pack (Licensed) SSMS Boost SQL Hunting Dog SqlSmash red-gate.com apexsql.com ssmstoolspack.com ssmsboost.com sql-hunting-dog.com sqlsmash.com Tools: Search in SSMS
  35. 35. Tip #4: Templates and Snippets
  36. 36. Template Browser Create Templates CTRL ALT T Templates
  37. 37. Replace Template Parameters with actual values CTRL SHIFT M Template Parameters
  38. 38. CTRL K CTRL X Insert Snippet CTRL K CTRL S Surround With Snippet Snippets
  39. 39. Redgate SQL Prompt (Licensed) ApexSQL Complete / Refactor SSMS Tools Pack (Licensed) SSMS Boost Poor Man's T-SQL Formatter dbForge SQL Complete (Licensed) SQL Formatter SqlSmash red-gate.com apexsql.com ssmstoolspack.com ssmsboost.com poorsql.com devart.com/dbforge sql-format.com sqlsmash.com Advanced Snippets and Formatting
  40. 40. Redgate SQL Prompt Demo
  41. 41. Tip #5: Registered Servers and Multiserver Queries
  42. 42. Registered Servers Save and group servers Is the server running? Multiserver Queries View Registered Servers CTRL ALT G
  43. 43. Manage services from SSMS
  44. 44. Multiserver Queries
  45. 45. Multiserver Queries
  46. 46. Tip #6: SARGable Queries
  47. 47. SARGable Queries "The query can efficiently seek using an index to find the rows searched for in WHERE or JOIN clauses" Compare it to finding a person in a phone book (…let's just pretend we still use phone books…)
  48. 48. SARGable Queries Adama, Lee Adama, William Agathon, Karl Baltar, Gaius Dualla, Anastasia Gaeta, Felix Henderson, Cally Roslin, Laura Thrace, Kara Tigh, Saul Tyrol, Galen Valerii, Sharon Find all rows where Name starts with 'T'
  49. 49. SARGable Queries Adama, Lee Adama, William Agathon, Karl Baltar, Gaius Dualla, Anastasia Gaeta, Felix Henderson, Cally Roslin, Laura Thrace, Kara Tigh, Saul Tyrol, Galen Valerii, Sharon Find all rows where Name starts with 'T'
  50. 50. Non-SARGable Queries "The query has to scan each row in the table to find the rows searched for in WHERE or JOIN clauses" Compare it to finding a person in a phone book (…let's just keep pretending we still use phone books…)
  51. 51. Non-SARGable Queries Adama, Lee Adama, William Agathon, Karl Baltar, Gaius Dualla, Anastasia Gaeta, Felix Henderson, Cally Roslin, Laura Thrace, Kara Tigh, Saul Tyrol, Galen Valerii, Sharon Find all rows where Name contains 'al'
  52. 52. Non-SARGable Queries Adama, Lee Adama, William Agathon, Karl Baltar, Gaius Dualla, Anastasia Gaeta, Felix Henderson, Cally Roslin, Laura Thrace, Kara Tigh, Saul Tyrol, Galen Valerii, Sharon Find all rows where Name contains 'al'
  53. 53. sqlbits.com/Sessions/Event7/Understanding_SARGability_to_make_your_queries_run_faster
  54. 54. Tip #7: Query Analysis
  55. 55. Execution Plans Display Estimated Execution Plan CTRL L Include Actual Execution Plan CTRL M
  56. 56. Execution Plans See how a query will be executed:
  57. 57. Details in Tooltips
  58. 58. Details in Properties
  59. 59. Live Query Statistics Include Live Query Statistics
  60. 60. Live Query Statistics Include Live Query Statistics
  61. 61. Free Tool: SentryOne Plan Explorer sentryone.com/plan-explorer
  62. 62. Free Tool: SentryOne Plan Explorer answers.sqlperformance.com
  63. 63. red-gate.com/hub/books/ Free Book: SQL Server Execution Plans by Grant Fritchey (@GFritchey)
  64. 64. Tip #8: Query Statistics
  65. 65. Statistics IO SET STATISTICS IO OFF; SET STATISTICS IO ON;
  66. 66. Statistics Time SET STATISTICS TIME OFF; SET STATISTICS TIME ON;
  67. 67. Statistics Time and IO SET STATISTICS TIME, IO ON; SET STATISTICS TIME, IO OFF;
  68. 68. Free Tool: Statistics Parser statisticsparser.com by Richie Rump (@Jorriss)
  69. 69. Client Statistics Include Client Statistics SHIFT SALT
  70. 70. Client Statistics Compare multiple query executions:
  71. 71. Tip #9: Activity Monitoring
  72. 72. sqlblog.com/blogs/adam_machanic Free Script: sp_WhoIsActive By Adam Machanic (@AdamMachanic)
  73. 73. Free Script: sp_WhoIsActive sqlblog.com/blogs/adam_machanic By Adam Machanic (@AdamMachanic)
  74. 74. Tip #10: SSIS with Biml
  75. 75. …what do you need me to do after lunch? Of course I can create 200 SSIS Packages!
  76. 76. Business Intelligence Markup Language Easy to read and write XML language Generate SSIS packages from metadata
  77. 77. What do you need? Free add-in for SSDT varigence.com/bimlexpress Free online Biml editor bimlonline.com
  78. 78. Create many SSIS packages from one Biml file How does it work?
  79. 79. Biml for SSIS demo
  80. 80. Where can I learn more? Free online training bimlscript.com
  81. 81. …BimlBreak the rest of the week ☺ Biml on Monday…
  82. 82. @cathrinew cathrinew.net hi@cathrinew.net Not enough details? Too fast? Don't worry! cathrinew.net/efficient

×