T-SQL Tuesday #159 – What’s Your Favorite New Feature?

Invitation and wrap up from Deepthi Goguri.

This month, I am inviting everyone to blog about two topics:

  1. Blog about your new favorite feature in SQL Server 2022 or in Azure. Why is it your favorite feature and what are your experiences and learnings from exploring this feature? If you have not explored these new features yet, No worries! Blog about the features you feel interested in exploring.
  2. New year, New Resolutions. What are your new year resolutions and how do you keep the discipline doing it day after day? Here are some examples: new hobby, plan to spend more time doing physical activity, wanted to read list of books (Please mention the names so it may also inspire others to read those books), journaling or any other resolutions you plan for this year.

Here are my answers to above questions:

  1. I am looking forward to learn about my favorite feature Query Store and its advancements in the SQL Server 2022. Query Store feature now supports the read only replicas from availability groups. The other advancement in Query Store is Query Store hints. I have written a blog post about it here. The other new feature is the parameter sensitive plan optimization where multiple plans are stores in plan cache for a single stored procedure reducing the parameter sniffing problems.
  2. This year, my resolution is to include exercise to my daily routine and reading David Goggin’s book all over again “Can’t Hurt me” before I begin to read his second book “Never finished”. It is getting harder to keep the exercise discipline. I had my gaps but I know I will get into the track again. I believe it is all about doing your best when you feel the worst. I am looking forward to listen to your resolutions and your discipline in following them day in and day out.

If you are looking for the latest features in SQL Server 2022, follow this series of videos by Bob Ward and Anna Hoffman explaining the new capabilities and features for SQL Server 2022. For new features in Azure, please check Azure SQL updates here and general overall Azure updates here.

T-SQL Tuesday #149 – Blog about T-SQL Advice you’d give to your younger self

Invitation and round up from Camila Henrique.

T-SQL Tuesday is a monthly blogothon where a host chooses one topic and bloggers around the world give their ideas about it. This month is my first time being the host and I’m so excited!

April’s theme: if you could give advice about T-SQL to your younger self, what would you say? I’m not defining any more specific sub-topics here, I’m opening the floor to hear ideas about your past experiences and what you wish you knew better back then.

T-SQL Tuesday #146: Upending Preconceived Notions

Invitation and round-up from Andy Yun.

Welcome back to another edition of T-SQL Tuesday! I’m honored to be your host once again!

Theme to Kick off 2022

This month, I’d like to ask everyone to think about something you’ve learned, that subsequently changed your opinion/viewpoint/etc. on something. Maybe you’ve had a certain opinion, belief, or bias? Perhaps you’ve always thought something worked a certain way? Or you’ve always thought that a certain something (called “X”) was only good for “A”, only to later learn that it can help with “B”, and “C” as well. Regardless, you learned something and it totally upended and changed that preconceived notion you held previously.

When has this happened to you Andy?

Let me share an example. In my past as a T-SQL developer, I remember when I first learned about CTEs. I thought the world of them and started using them everywhere! However, there was one slight problem. I was under the mistaken impression that they pre-materialize each sub-query. And they do… in OTHER RDBMS’s. Whoops! After a few years, I learned that they don’t behave that way in SQL Server. Instead the query optimizer inlines the query in the CTE, making them functionally no different that a subquery. And well, let’s just say that that made me regret some of the coding decisions I’d made during my “CTEs-are-awesome” phase.

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

Invitation and wrap-up from Lisa Griffin Bohm.

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!

T-SQL Tuesday #112 – Dipping into your Cookie Jar

Invitation and roundup from Shane O’Neil

I’ve been listening to audio-books on the way into work, and the current one struck a cord with me.

It’s “Can’t Hurt Me” by David Goggins and it is about his story from a rough upbringing “into a US Armed Forces icon and one of the world’s top endurance athletes“.

One part of the story that has stuck in my mind is where he talks about “dipping into the cookie jar“. It’s an analogy that is easy to follow when you understand it.

Dipping into the Cookie Jar is about when the going gets tough and you don’t think you can handle anymore, then you think back about your accomplishments and take some sustenance from them. You dip back into that cookie jar and use whatever energy that provides to keep going.

Things are going to be tough for everyone at some stage or another. There are going to be low points spread out among the highs. While I know that reaching out to the SQL Family is an amazing external resource to help lift the members up, I think it’s also important for people to remember those accomplishments and realise that they have an internal resource as well.

That is what I want from the contributors of this T-SQL Tuesday, those memories that they can think back on for sustenance. Like the humble cookie, I want a humble brag.

Share some cookies

This month’s T-SQL Tuesday is about finding those cookies and sharing them.

These cookies do not have to be massive. Like the various cookies out there, they can be big or small – or even technical.

So tell me about a time when you had an accomplishment that can keep you going.

  • About the time you made your first server specification for a new SQL Server instance.
  • About the first time you wrote out the syntax for a Recursive CTE by memory.
  • About the time you knew the answer to a technology question from someone else.
  • About after all the study you passed the certificate you were after.
  • About the time you created a PowerShell script, or a Python script, etc. and it worked.
  • About the time you created a PowerShell script, or a Python script, etc. and it didn’t work but you were able to fix it.
  • About how you inherited an unorganised instance and made improvements to it.
  • About how you stood, trembling and scared for your first presentation, but you did it in the end.

The above “cookies” are all technical but your ones don’t have to be. Whatever your favourite cookie is, let me know.

T-SQL Tuesday #108 – Non SQL Server Technologies

The invitation and summary is from Malathi Mahadevan.

Non SQL Server Technologies

This is also the week of the PASS Summit – the one conference that is still the largest gathering of folks active in the SQL community.  For people like me, who have done the yearly trek to the summit more than a dozen times, it is literally like a family reunion. Aside from these sentiments – what has changed significantly about PASS Summit is that it is no longer a conference entirely dedicated to just SQL Server. There is so much more there – DevOps, Data Science/Machine Learning related, CosmosDB, PowerBI/data visualisation, Entity Framework, Micro Services, on and on. What it indicates is how much data world is expanding and how necessary it is for us to keep up with that. There was a time when I personally wanted to do MCM and retire a SQL Server guru – the MCM went away and right now I know for sure that just insisting on being a SQL Server Guru will not take me very far. I am actively learning how to work with DevOps, PostGres, ElasticSearch, and a number of other things.

So the challenge for this T-SQL Tuesday is – pick one thing you want to learn that is not SQL Server. Write down ways and means to learn it and add it as another skill to your resume. If you are already learning it or know it – explain how you got there and how it has helped you. Your experience may help many others looking for guidance on this.

T-SQL Tuesday #093 – Interviewing Patterns & Anti-Patterns

Invitation and advice from the community from Kendra Little.

What advice do you have for people preparing for or going throughn interview?

Feel free to be creative on this topic. Take whichever approach you like best:

  • You may focus on patterns to follow for success
  • You may list anti-patterns, too: things that might seem like a good idea, but are a recipe for disaster
  • You can write about your own highs and lows as a candidate or as an interviewer
  • Be as specific as you want for interviewing for or hiring for your given skillset, whether you’re a developer, DBA, manager, consultant, or something else entirely

Whichever route you take, it’s probably a good idea to disguise the identities of past employers, candidates, etc.

Personally, I’m going to take the approach of writing about an interview for a SQL Server position that I completely bombed as a candidate, and why it ended up being one of the best learning experiences of my life (although it was painful at the time). It taught me a lot about successful interviewing patterns.

I can’t wait to learn about YOUR interviewing patterns and anti-patterns as well.

Get ready, get set, get blogging!

T-SQL Tuesday #92, Lessons learned the hard way

Current Invitation and roundup from Raul Gonzalez.

For this month, I want you peers to write about those important lessons that you learned the hard way, for instance something you did and put your systems down or maybe something you didn’t do and took your systems down. It can be also a bad decision you or someone else took back in the day and you’re still paying for it…

There are so many things to share here so everybody can learn from each others mistakes, because all of us were once a beginner and no one is born with any knowledge about SQL Server.

Please do not be ashamed of sharing your experiences, you can anonymize the whole story if you want but remember all people make mistakes, the important is to learn from them and try not to repeat them in the future.

T-SQL Tuesday #065 – Teach Something New

Invitation and roundup from Mike Donnelly.

The topic this month is straight forward, but very open ended. You must learn something new and then write a blog post explaining it. One of the reasons I present and blog is because it forces me to really learn a subject if I am going to explain it to someone else. I am now giving all of you that same opportunity.  You’re welcome.

I considered limiting this to just T-SQL, but that seemed….limiting. It just has to be something SQL related and also small enough that you can explain in a single blog post. Maybe a T-SQL command or DMV you have been meaning to learn more about or an SSIS component or PowerShell commandlet you’ve never used before. Try not to make it too theoretical I want some code snippets or screen shots. OK. We’ll meet back here on the internets in a week and all have some new knowledge.

 

T-SQL Tuesday #060 – Something New Learned

Invitation and roundup from Chris Yates.

So, here it is. I put the challenge out to discuss something new learned last week. I was fortunate enough to attend the PASS Summit last week in Seattle. While this post will not be my summarization of that trip (that will be another post) I did have several take-a-ways. I sat in some stellar sessions with some renowned speakers.

However, one re-occurring theme kept coming to my mind – the people. Listen, I’ve been through a lot over my 15 years with SQL, and my 3 years actively involved in the community and this past week affirmed something for me. LISTEN to the people.

I place strong value in the sessions I attended; along with that I have to note that face time; one on one time with real people in my industry is about the best form of learning I could ever hope to obtain.

With that learning comes in issues related to both SQL and non SQL attributes. I had so many positive conversations on leadership alone that sparked a new kind of fire within me; one that was not as bright as what my technical fire had been.

Guys, listen. I could write 10 blog posts on how buffer size could help with backups, the need to have always on implemented, or how to tune indexes all day long. The people, better yet the community is where I believe the learning lies within. Out of 5k people last week I ended up meeting a guy that works two blocks from me and we got to discuss the community and what it means to us.

Have you challenged yourself lately? I mean have you really challenged yourself lately in learning something. I don’t care if you are just starting out or the most seasoned vet around; the ability to learn happens everyday and I’m learning that is what separates the exceptional data professional from the data professional.

You see, the exceptional data professional hangs around the community zone at Pass Summit to help others in the community with issue they may have. The exceptional data professional sits down next to you when you are the new kid on the block and encourages you to make the most of your career then tells you some of his/her pitfalls they had that you can avoid, and the exceptional data professional takes you under his/her wing when you ask them for help or assistance.

You don’t have to travel all the way to Seattle to learn; no you have learning opportunities all around you. From SQL Saturday’s to Virtual Chapters on the web but it starts with you. That’s right, you have to be willing to take that first step; get involved and start learning.

I can tell you from experience and the roller coaster ride I’ve been on for the past three years that you will not regret it. Strive for excellence and provide that leadership through service that the community seeks. Yeah, I may be a tad passionate about what I do; you’ll find that kind of trait with others in the community.

So, I’ve challenged myself……..will you?