T-SQL Tuesday #193: What I Wish I Knew Back When…

T-SQL Tuesday Logo

Welcome back to another edition of T-SQL Tuesday. This month’s edition is hosted by Mike Walsh, who asks authors to write two short notes to yourself – one in the past, and one from the future.

A Note to My Past Self…

Or otherwise titled, learn from what I wish I knew then and know now.

Understand Business Value

And how to communicate it. This is the lesson that I wish I knew then, that I know now. As a technologist, especially my younger self, I never cared about the business side of things. I went to school for a computer science degree – not a business degree. Business folks are good at what they do, and I wanted to do what I wanted to do, which was play in tech.

But as we all know, oftentimes in our career, to play with tech, we need buy in from the business. There’s a lot of things we must justify and understand the why’s behind it.

  • Want to fix some code? Translate that to how it impacts the business.
  • Want to attend a conference or training? Understand how increased knowledge and skill will bring value to your business

Along those lines, I also wish I knew and understood the value of writing a business plan. Or at least a business justification document. And there are several principles of communication that I wish I understood better… like focusing on solutions that drive to desired outcomes. Former me would have brushed off those terms as business-speak jargon, but nowadays I firmly believe in this mindset.

That’s it for now. Mike may have asked for a message to my future self, but instead Sebastian the dog is demanding his evening walk. 🙂

Until next time – thanks for reading!

T-SQL Tuesday #192: SQL Server 2025!!!

T-SQL Tuesday Logo

Welcome back to another edition of T-SQL Tuesday! This month’s edition is hosted by Steve Jones, who is asking authors to share what they’re excited about in this new release.

Going Beyond Vector Search

Through the tight partnership between Pure Storage and Microsoft, I’ve had the privilege of “knowing what’s coming next” for quite a while now. It’s why I was able to get a jump start on Vector Search work for example. But that’s not what I’m going to talk about today.

At this point, Vector Search and AI may steal the spotlight, but there’s SO MUCH MORE in the new release! What I’m going to highlight may be the least “shiny” and “flashy” but I believe it’ll have broad impact – Availability Group enhancements.

AG’s Under the Covers

In my role at Pure Storage, I’ve learned a tremendous amount about how AG’s work under the covers. Pure offers storage array options for HA/DR replication and I regularly have conversations with customers about the pros and cons of mixing and matching application level options like AGs with storage array options.

One thing I never really fully understood, until I stumbled upon this blog about a year back, is the construct of Flow Control in AGs. In fact, if you’ve never checked out SQLTableTalk.com, take a moment to check it out – they offer a tremendous amount of deep content about SQL Server (with the two original founders being Microsoft employees – RIP Yvonne).

But I digress. All of the new options in regards to AG’s like max ucs send boxcars are there to improve performance, resiliency, and failover efficiency of Availability Groups. And I feel many DBAs do not fully appreciate how AG’s really work under the covers, which is why I feel that it is worthwhile to highlight these resources.

Your Homework

If you use AG’s today, I would encourage you to refresh your knowledge on how AG’s communicate behind the scenes. Once you do, then look into the 2025 enhancements and I believe you’ll come away with a better appreciation of how 2025 further improves on Availability Groups.

T-SQL Tuesday #189: Musings on AI’s Impact at Work

T-SQL Tuesday Logo

Welcome back to another edition of T-SQL Tuesday. This month’s blog party host is Taiob Ali, who asks “How is AI changing our careers?

Rewind a Year Ago…

Had you asked me this question a year ago, I would have said not at all. Me in the summer of 2024, still looked at AI as a hyped up fad technology. At that point, all I really knew of AI were stories of people using ChatGPT for research with flawed results, writing papers and blogs with hidden inaccuracies, and generating ridiculous images. To me, it was overblown hype and fluff.

What Changed Since Then?

Two things started to change my perspective. First was SQL Server 2025 – I got involved in Private Preview and one of the flagship enhancements was Vector Search support. The second was Anthony Nocentino (b), who started sharing with me how he was making use of AI while coding. I had a number of “what, really, you can do that?” moments. He showed me how these tools were more than just “dumb chatbots” but could take wider inputs like existing code, and how one could iteratively work with them to modify and make changes.

The industry is not only changing, but changing TOO FAST.

I had the fortune of attending an AI and Data conference here in Boston where I heard that quote and it really resonated with me. I think back to other shifts and evolutions in technology in the last 30 years… the rise of the Internet… smartphones… computing… and I would argue that none of these have moved as fast as we’ve seen AI tech evolve in the last handful of years. While I haven’t keep tabs on it, I am very much doing so now.

Where Am I Today?

If you’ve been tracking my blog, you’ll see that I’ve really dug into Vector Search on SQL Server 2025. My “Practical AI in SQL Server 2025: Ollama Quick Start” blog has been one of my most popular blogs ever! And I am super happy with my new presentation: A Practical Introduction to Vector Search in SQL Server 2025.

How Am I Using AI Day to Day?

I don’t spend my day-to-day living in code, like I once did. But I do find myself having to dig deep and troubleshoot interesting things. Just the other day, had a scenario where a customer was setting up a new WSFC cluster but without shared storage, and were confused as to why some nodes saw volumes presented and others did not. We have a Gemini enterprise license, so I used the Pro model to do some deeper research on my behalf. It generated a very in-depth report for me that helped teach me a ton in regards to how Windows recognizes volumes that are presented to it when it is a standalone install vs when it is a node in a cluster.

What was more important to me is that this Deep Research functionality provided over 40 different citations, enabling me to dig deeper at the sources it used to further validate its findings. Hallucinations (or false output) are definitely a real possibility (and the “why” is a complete separate but fascinating topic), so having a more robust output with citations that I can validate, is a turning point for me.

Like It Or Not, Change is Here…

There’s still a lot of hype and a lot of noise to cut through. And there are also very sharp edges and definite threats and dangers too. But I also strongly believe that we must look past the ragebait headlines and dig deeper into the component technology pieces themselves. I believe that we, as technologists, need to better understand each component so that we can utilize these tools in a responsible, ethical manner.

The other aspect that I am very mindful of is that as a data professional, what drives all of these tools? Data! I feel that we data professionals have an amazing opportunity to future-proof our career journey, if we embrace and build our expertise in this industry.

And here’s an AI generated image of a dog, using the AI image generation built into WordPress. I still prefer real photos but this ain’t too shabby.

Image
Prompt: Generate a realistic image of a brown and white dog sitting a desk, with a laptop in front of him, facing the camera. The dog should be a chihuahua or labrador mix, with pointed ears. Behind the dog should be an array of books and bookshelves.

T-SQL Tuesday #188 – Growing the Next Generation

T-SQL Tuesday Logo

Welcome back to another edition of T-SQL Tuesday. This month’s topic is an inspirational one, hosted by John Sterrett. John would like us to blog about what we can do to help grow the data community.

Growing new speakers is a topic that I have done a lot with already, so I won’t beat that drum. Instead, what I will suggest is something that anyone can do:

TL;DR – Recognize, Ask, & Offer

Step 1: Recognize Talent and Potential in Others

If you’re reading this, you’re part of the data community. You may not speak or blog regularly, but nonetheless, you are a participant. As such, you can watch for and recognize others. Maybe you’re reading an interesting thread on the SQL Server sub-Reddit… maybe you’re watching a conversation on the SQL Slack channel… Look for statements by individuals that pique your interest.

Step 2: Ask or Invite Them to Contribute

You’ve noticed someone talking about something really interesting? Ask them to share more of what they know about that topic. Invite them to write something more in-depth about it. Being asked and invited to share more, is validation for that other individual. And I believe that each one of us should always be looking for opportunities to validate others and raise each other up.

Step 3: Offer to Help

Anyone can help anyone else.

Stop – re-read that first statement again.

You can help.

There’s a mental trap that many of us fall into (I used to be one of those), where we believe that we are not in a position to help, because we do not believe we are an expert. You do not have to be an expert to help. You can help, simply by encouraging someone get their ideas out there and become more involved in the data community. Words of encouragement… or saying thank you for something you found useful… these are all ways to help.

One More Twist

This blog has been written, from the angle of asking you, the reader, to recognize potential in someone else, encouraging you to ask them to contribute, and offering your own help to further grow them.

Are YOU, whoever is reading this right now, the one who has that potential?

Look in the mirror… the answer is yes. You can be a part of the next generation… and there are many out there who will help you. Don’t know where to find someone? Ask… ask me… you’re reading my blog right now… contact me.

T-SQL Tuesday #184: My Top Mentoring Obstacle

T-SQL Tuesday Logo

Welcome to another edition of T-SQL Tuesday! This month’s host is Deborah Melkin, who asks bloggers to share some thoughts around mentoring.

My Experiences with Mentoring

Over the course of my career, I’ve had the wonderful opportunity to mentor others in addition to having a mentor. It has been a fantastic experience almost each and every time too.

I value mentorship because I believe that it benefits both parties: the mentor and mentee. Some of those shared benefits result from the sharing of experiences and perspectives. For example, a mentee may bring a question to a mentor, that presents a situation from a new angle that the mentor may not have ever considered before. In general, it is an amazing experience for both parties involved and a wonderful opportunity for mutual growth, not just growth of the mentee seeing mentorship.

So Why Don’t I Do This More Often?

As I think back, I’ve mentored others far more often than I’ve been mentored myself. One might think this is rather peculiar, given how I professed the benefits of being mentored just a few moments ago.

“Andy, why haven’t you sought out a mentor more regularly? Is it because you have a difficult find finding a mentor (a commonly voiced challenge)?”

Because I hate setting goals.

For me, I don’t have a difficult time thinking of someone who I would like to have as a mentor. And I am perfectly okay ASKING to be mentored (as that is another common challenge voiced by others). My biggest obstacle is if that person says yes, then what?

One of the generally accepted best practices for a successful mentoring relationship is to try and think of some goals of what you’d like to get out of the mentoring relationship. It helps to create alignment for both parties, so they know what the time is being spent for. And that’s something I’m terrible at.

Unpopular Opinion…

In my opinion, a mentoring relationship CAN work just fine without a specifically set goal. But what’s the point then Andy?

The point is that your mentor is your trusted advisor, to help you work through whatever challenges life may throw at you that week. And just life work life for most of us, our priorities and challenges change frequently.

While I’ve framed this as an unpopular opinion, I will also fully admit that I still need to ask, but just set the expectation up front. It’s no different than say, “hey, can you help me for a few hours to develop this presentation” vs “hey, can you help me just get a better handle on my career?” And the person being asked to mentor MAY be okay with a less focused mentoring relationship. What I’m guilty of, is assuming that they would not be since it is counter to the typical best practice.

Moral of the Story… is?

Simply ask anyway. But do be clear on what your expectations are, even if you do not have any specific goals in mind. Heck, the kick-off for the mentoring relationship could be a brainstorming conversation around goals!

(I should take my own advice sometimes… )

Thanks for reading – happy T-SQL Tuesday!

T-SQL Tuesday #182: Integrity

T-SQL Tuesday Logo

Welcome back to another edition of T-SQL Tuesday! This month’s blog party is hosted by Rob Farley who is asking bloggers to share some thoughts around a single word: Integrity.

To the Dictionary!

Like many words in the English language, Integrity has several meanings. I decided to look at a handful of dictionaries and am settling on this one from the Cambridge English Dictionary which states:

the quality of being whole and complete

In the realm of data, what does it mean for data to be “whole” and “complete?” Well, if I’m storing a simple value like “$14,693.31” or “fourteen thousand and six hundred and ninety three dollars and thirty one cents”… I would be rather upset if the value that wound up being stored was “693.31” or $1 ,6 3 .31″. That data is neither whole nor complete, thus the integrity of my data is compromised!

Garbage In, Garbage Out

I cannot tell you how many times I’ve encountered scenarios where “this data looks wrong.” Well… can one ensure that it is being retrieved and displayed correctly from the storage media that it resides on in the first place? Are you viewing/validating the data in question correctly? Whatever client/method you are using to review your data – that is suspect and its integrity is in question.

Assuming the answer is yes, well, did the data somehow get changed while it was “at rest” on its media? This is highly, highly unlikely – stable media like flash or even spinning disk, very rarely flip bits when the media is idle. But in extremely rare cases, okay, your storage media has lost its ability to maintain your data integrity.

But more often than not, questionable data was written to your media in an incorrect fashion. That is where the saying, “garbage in, garbage out” is definitely applicable. So, what application is writing your data?

“Oh no Andy, it’s not the application – it must be the storage that’s corrupt!”

“If the storage were corrupt, we’d be seeing random garbage data all over the place. Not just these and only these specific dollar values. So that’s HIGHLY unlikely here.”

“It’s got to be the storage is corrupt, check again.” (hours pass)… “… okay, we found a bug in our code.”

Step by Step

What’s the moral of this simplistic story here? As you determine the source of an integrity issue, you must carefully walk the stack and assess at each point in the stack, where your integrity was compromised.

But Andy, shouldn’t your database have already had other things in place like constraints, foreign keys, etc. to also ensure that all data written down maintains its integrity? Absolutely… but that’s another story for another day (that I hope another T-SQL Tuesday’s blogger tackled too).

Thanks for reading.

T-SQL Tuesday #179: The Most Important Tool for a Data Detective

T-SQL Tuesday Logo

Welcome back to another edition of T-SQL Tuesday! This month’s edition is hosted by my good friend Tim Mitchell (b). In this month’s edition, Tim asks participants to share “What’s in your data detective toolkit?

The All Powerful…

… Question. That is what I now believe is the most important tool for a Data Detective.

Asking Questions Effectively

This nuance involves HOW you ask a question. Some of this involves knowing your audience. Is this the right place or the right time? Sometimes there comes a point where asking questions is just counter-productive because your audience has no interest in answering. And it also means you need to make sure you’re asking the correct audience in the first place.

Asking Effective Questions

This nuance involves structuring an individual question to get the answer that you are after. There are times you just want a Yes or No – so say that as part of your question. There are other times you want more details… sometimes you best state that up front too.

Framing

Another critical aspect to asking questions effectively and asking effective questions, is to properly frame the entire interaction. State WHY you are asking what you are asking. If it is a higher-stress situation, doing this effectively can help others understand that you’re trying to work towards a common goal of solving a problem.

Active Listening

Finally, the most important thing to all of this is learning how to ACTIVELY LISTEN. Too often, people will only hear one or two tidbits then immediately start thinking about what they want to ask or say or do next, rather than continuing to listen to the respondent. If you are talking just as much or MORE than the respondent, you’re not questioning or listening effectively.

Stop Jumping to Conclusions

One thing I’ve see all too regularly, is that someone will present a problem or a challenge, and people will immediately try to start to answer or address the challenge. But more often than not, not enough information is ever given initially. Why are you seeking to do this? What have you tried thus far? What is your desired outcome? What problem are you trying to solve for here?

It’s not good enough to just ask questions. Questions can sometimes put people on the defensive. Why are you putting me on trial? One must also learn how to ask questions effectively and learn how to ask effective questions. Yes, these are two distinct but critical nuances.

A Recent Example…

I enjoy spending time on Reddit and also enjoy answering questions on the r/SQLServer subreddit. Recently, someone asked about a data load that was “overwhelming the resources” and “slowing the API down to a level that’s unacceptable in production.” Most of the immediate respondents jumped in, assuming this was an on-prem SQL Server and trying to solve the challenge using only the initial information given.

Instead, I saw the necessity to dig deeper. The original poster (OP) then shared that this was an Azure SQL Database. Okay, that changes some of the rules here… so I dug deeper.

And eventually the OP stated that it was a Azure SQL DB on a single vCore, General Purpose tier! FULL STOP! I/O characteristics and potential is tied directly to the number of vCores one has allocated to an Azure SQL DB and well, one vCore is basically the lowest one can go. Might be fine for development, but how can one expect to run a Production application on a single vCore?!

So while other respondents gave great advice on how to tune a data load, none of it would do any good until OP actually increases the number of vCores of their Azure SQL DB!

Conclusion

If you’re reading this, you’re most likely already an inquisitive and curious type. As such, I hope this blog will encourage you to dig deeper and hone your skills around asking effective questions and asking questions effectively.

Thanks for reading!

T-SQL Tuesday #174: Your Favorite Job Interview Question

Image

Welcome to another edition of T-SQL Tuesday! This month’s blog party is hosted by Kevin Feasel (b). Kevin also happens to be the maintainer of Curated SQL, which is an excellent resource to keep up on current trends! Anyway, in this month’s edition, Kevin has asked us to write about our favorite job interview question(s).

You Know Everything… Right?

In my personal opinion, a strong candidate for just about any position, isn’t one who happens to be a walking encyclopedia with a photographic memory. In fact, I really do NOT want a “know-it-all,” even one who truly DOES “know-it-all.” K.I.A.’s (a rather unfortunate acronym yes, but I’m feeling lazy so will keep using it) are oftentimes arrogant, lack empathy, and generally difficult to work with. They bring a library of knowledge to the table, and they know it… and unfortunately act accordingly. This has just been my unfortunate experience with K.I.A.’s, and there’s absolutely exceptions out there… and if you DO find one of those exceptions, well, make that exception!

Seek… and You Will Find Answers…

Anyway, I’d far rather find someone who is resourceful, especially when faced with something they do not know. So I will often ask questions that will test that resourcefulness. I’ll ask for stories or anecdotes, when a person got thrown into something and had to “figure it out.” What did they do? Where did they look for information? Did they turn to others? If so, who? I might also vary it, by asking hypotheticals. If you had to learn technology X tomorrow, where would you start? How would you go about it? What would be your learning process? And even better, have you had to do something like this recently?

Reading Between the Lines

The nice thing about questions like the above, is that one can also read between the lines and learn other things about a candidate. Are they excited when they answer? Do they have personal stories to draw upon or are they just giving generic answers like “I’d find a book.” Does being thrown into something unknown make them uncomfortable or excited? You may be able to glean what type of learner they are as well; some folks prefer to read, some prefer to dive in and get hands on first.

TL;DR – What Is Your Favorite Interview Question Andy???

One whose answer contains multiple insights. One where I can learn something about a person by their verbal answer, but also learn more deeply about them by their non-verbal answers.

Thanks for reading!

T-SQL Tuesday Logo

T-SQL Tuesday #159: SQL Server 2022 & Purvi’s List

Image

Welcome to another edition of T-SQL Tuesday. This month’s blog party is hosted by Deepthi Goguri (b|t) who asks participants to blog about their new favorite feature in SQL Server 2022.

In my opinion, 2022 is absolutely a major release with significant enhancements which should make it compelling to upgrade rather than wait for another release down the line. I’m thrilled for the improvements in Intelligent Query Processing, TempDB, and (after the training helped me ‘get it’) Arc-enabled SQL Servers. But that’s not what I want to blog about today.

It’s Often the Little Things

By sheer coincidence, I had the privilege of being invited to a private SQL Server 2022 workshop taught by Bob Ward last week. And through my job, I also had the privilege of doing some testing work around QAT backups and S3 Data Virtualization during the private preview phase last summer. So while I had exposure and access to SQL Server 2022 for much longer than others, there were many things that Microsoft loaded into the 2022 release that I barely skimmed over or knew were even there.

Towards the end of the workshop, Bob presented a slide called Purvi’s List. Purvi Shah is an engineer on the SQL performance team and as Bob said, “spends her time finding ways to make SQL Server and Azure SQL faster.” When Bob put up Purvi’s List, I let out an audible “holy shit,” much to Grant’s amusement.

Image

So what caught me by surprise?

Instant File Initialization (IFI) for Transaction Logs

Okay, that’s cool!

For simplicity’s sake, I’ll just quote the documentation (as written today):

Transaction log files cannot be initialized instantaneously, however, starting with SQL Server 2022 (16.x), instant file initialization can benefit transaction log autogrowth events up to 64 MB. The default auto growth size increment for new databases is 64 MB. Transaction log file autogrowth events larger than 64 MB cannot benefit from instant file initialization.

https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-instant-file-initialization?view=sql-server-ver16

So yeah, it is limited to 64MB growth size. But another entry on Purvi’s List is that the VLF algorithm has also been improved.

If growth is less than 64 MB, create 4 VLFs that cover the growth size (for example, for 1 MB growth, create 4 VLFs of size 256 KB). … and starting with SQL Server 2022 (16.x) (all editions), this is slightly different. If the growth is less than or equal to 64 MB, the Database Engine creates only 1 VLF to cover the growth size.

https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide?view=sql-server-ver16

So do I think everyone should now change their Transaction Log autogrow sizes to 64MB? Of course not. But do I think that this kind of small but interesting improvement is still notable and will hopefully be expanded on in a future release to a larger scale? Absolutely!

And there are a few other things on Purvi’s List too: reduced buffer pool I/O promotions and enhancements to the spinlock algorithms. All amazing work!

Thanks for reading.