Posted in tSQL, tSQL Tuesday

TSQL Tuesday #133 Wrapup

Thanks to everyone who participated!  I’m excited to go look up some interesting information, see some new presentations when they come out, test out some PowerShell splatting, and start putting demo and sample code into SQL Notebooks!

Rob FarleyThe Other Side of the Room: Rob has learned mostly non-technical lessons. He encourages people to put themselves in the presenter arena. When he gets useful feedback, he takes note and tries to give presenters he watches the same kind of feedback.

John McCormackPowerShell Splatting – What was wrong with backticks?: John had a lot of backticks in his PowerShell code to make it more readable and “keep” code on the monitor. An attendee asked why John didn’t use splatting. John was intrigued and learned how to create a single variable at the top, consisting of an array or hash table of the parameters used in the code. This makes the code easier to read both for attendees looking at a slide, and others using your code.

Jess Pomfret –  T-SQL Tuesday #133: Jess has learned Git and GitHub from contributing to dbatools (woot!) She now hosts presentation demos/slides there. She also learned how to run Docker containers on her laptop for presentation demos. Thirdly, she learned how to build pester tests to ensure her Docker containers are in the correct state for her demos.

Aaron BertrandWhat Else Have You Learned:   Aaron has learned that not all airlines get you where you need to be when you think you need to be there, and that rehearsing content is valuable for a better idea on the content timing. And, sometimes, there are technical difficulties. The two biggest take-home lessons are to be prepared, and do NOT ad-lib 🙂 Oh, and pay attention to what presenters you’re watching do when the going gets tough, so you can learn those lessons a little less painfully! Thanks, Aaron!

Deborah MelkinWhat Else Have I Learned From Presenting?:
Deb learned how to use SQL Notebooks for presentation by converting each script for her T-SQL 101 session into a Notebook. Now Deb is writing a presentation on a Starter’s Guide to SQL Notebooks, which I can’t wait to see because I too need to figure this stuff out! Deb is another converted user of Git and GitHub, and has learned some GitHub-based swear words along with a few lost files. Thanks for persevering and sharing with us!

Tracy BoggianoWhat Else Have I Learned From Presenting?:  Tracy learned that PowerPoint subtitles will get closed captioning! She also learned a whole bundle about Linux when presenting on a Telgraf/InfluxDB/Grafana stack she was involved with setting up at work.

Mikey BronowskiWhat Else Have You Learned From Presenting?:  Mikey had written a blog post about saving Outlook attachments with PowerShell, but wasn’t allowed to use PowerShell at the time in the office. So, he figured out how to save attachments from multiple emails that fit some criteria, using VBA. In Outlook. Cool!

Deepthi GoguriWhat Else Have I Learned From Presenting?:  Deepthi learned some great technical concepts including memory grant connections, redundant joins between tables and their relationship to foreign key constraints, and some information about the NOEXPAND hint. Hmm, I will be looking that up too!

Kevin ChantLearning New Things By Building Demos:   While building demos, Kevin has learned about SharePoint setup and configuration, how to record and edit a video in Camtasia, and Docker setup. Thanks, Kevin! I might not look up the SharePoint config though – I’ve managed to avoid it up to now so I’d like to keep that record going!

Todd KleinhansWhat Else Have You Learned From Presenting?:  Todd learned that sometimes the most amazing ideas aren’t feasible for one reason or another – mostly one of the three roots of any project: time, resources, quality. He’d like to build a VR version of a technical presentation, which sounds amazing, and I hope the near future gives you more of what you need to continue on this project!

Nate Johnson –  Learn By Presenting: Nate tried some Twitch streaming but didn’t have many views. However, he’s been involved in small group learning sessions and realized that he talks to quickly, he enjoys audience interactions, and the infamous, Never Type in Demos!

Justin Bird –  T-SQL Tuesday #133: Justin learned about the contract that SQLBits has with the speaker. The speaker puts in a lot of time and effort and gets… feedback. So, anyone attending a presentation, anywhere – please fill out feedback forms to help them get better! Great point, Justin!

Elizabeth NobleFilling In the Gaps: I love Elizabeth’s use of “sweet potatoes” as a swear word, which is completely unrelated to this topic. She learned how to create VMs with PowerShell, including domain controllers. But IMO the most important take-home message is that we don’t have to know all the answers, but be willing to learn!

Honorable Mentions:

Mike Walsh –  Presenting: What I’ve Learned: Mike got struck with a case of the 2020 Blursday syndrome, so that’s why this is in the honorable mention (aka a little late) section. He talks about learning about log chains and what doesn’t break them, from the audience. He also recorded a video about presenting and things he’s learned about himself and life through presenting 🙂

Joshua HandlerSurprise!! You learned something you didn’t expect!: Josh had some blog host “unvisible” issues.  Josh was presenting on dbatools and was talking about profiles. Afterword, one of the attendees who was also an MVP, let Josh know that there were many profiles you can use with PowerShell. He also got good feedback about his first time presenting!

Thanks again, and now I challenge all of you out there to think about what presentation you could write, and what ELSE you might learn while writing that presentation (or presenting it!)  Go forth and learn – but stay safe and stay healthy!

Posted in tSQL, tSQL Tuesday

T-SQL Tuesday #133: What (Else) Have You Learned from Presenting?

This month, I’d like those of you who have presented, or written a presentation, to share something technical THAT DID NOT RELATE to the topic of the presentation, that you’ve learned in writing or giving the presentation. This can include a work presentation, for those of you who haven’t spoken at an event! 

Why do I ask?  Well, if any of you have heard Allen White (b|t) speak on any topic, he will start his presentation speaking about how much PASS has contributed to his life and career. He will then talk about how every person has a story to share, and there will be a piece of that story that no one has ever heard before. We ALL have something to learn from each other. He will also tell you that you will learn more than you ever thought just by writing and presenting on ANY topic, as well as answering questions!  So, I’d like folks who have done this to share and encourage – especially the new folks who are on the fence about presenting. Feel free to go more in-depth with some of the technical details of your learning than I did!

I will share a couple of stories about my own experiences. My first presentation at our local PASS user group was a lightning talk about a bizarre performance hit we took from a foreign key with an ON DELETE CASCADE option. It was a rare scenario, so I figured most folks hadn’t run into this.

As I was researching foreign keys in general, I realized… hey!  Did you know there were other options for updating and deleting data tied to foreign key constraints? I don’t know that I’ve paid attention to that for the last… at least 10 years. I’ve never seen any of these options used in code I’ve maintained or identified as problematic.  You can specify default behaviors for both delete and update options – for example, if I update the value that the foreign key constraint points to, I can change all those foreign key values to be NULL. Or to update that foreign key value to the new value. Or… not do anything. There are ramifications for all of the choices, but I could definitely see how they might be useful in certain scenarios.

Also, people were interested enough in the topic to ask about indexing on some of the different fields, and asked me to expand this into a full presentation. I did so and presented at our next local SQL Saturday, including testing with the indexes that were recommended to me.

Learning summary:

  1. tables may show up in the execution plan even if they weren’t in the query AT ALL (look for constraints!)
  2. there are other options for coding foreign keys to handle updates/deletes to the primary key data that could be useful elsewhere
  3. Reinforcement: Indexes with low cardinality don’t always improve performance!

I also wrote a book on refactoring legacy T-SQL. I was talking about functions, and how SQL Server’s STATISTICS IO won’t show IO that a function performs. I remember thinking, “I CANNOT write a book in 2019 that talks about running a trace!”  So, I started using simple Extended Events to show the increased IO for functions that the native SQL Server STATISTICS IO sneakily avoids. I need to start making more use of Extended Events but this was a great .. kick in the pants to get going on those, as well as being able to code a very simple, more modern solution to share with readers on how to more accurately find IO stats of the SQL you’re running/tuning!

I could continue about buying a “lab” laptop, re-learning how to use Oracle Virtualbox, dealing with networking (not one of my strengths), using SQL Server core (sooo fast to install!), and all of those fun things. But, there will be future blog posts on those topics, and it’s time for others to share THEIR stories and experiences!  Thanks for reading!