Posts by Brent Ozar

Should You Use SQL Server 2022’s STRING_SPLIT?

T-SQL
2 Comments
SQL Server 2022 improved the STRING_SPLIT function so that it can now return lists that are guaranteed to be in order. However, that’s the only thing they improved – there’s still a critical performance problem with it. Let’s take the Stack Overflow database, Users table, put in an index on Location, and then test a…
Read More

Should You Use SQL Server 2022’s DATETRUNC?

T-SQL
10 Comments
SQL Server 2022 introduced a new T-SQL element, DATETRUNC, that truncates parts of dates. For example: SELECT DATETRUNC(year, '2017-06-01'); 1 SELECT DATETRUNC(year, '2017-06-01'); Truncates everything in that date other than the year, so it returns just 2017-01-01 00:00: You might ask, “Well, why not just use YEAR()?” That’s a good question – there are times…
Read More

[Video] Office Hours: Great Questions, Part 2

Videos
2 Comments
Every time I think, “There can’t be any more SQL Server questions left,” y’all post more great ones at https://pollgab.com/room/brento! Here’s what we covered: 00:21 MattC: Hi Brent. Have you check out ChatGPT’s ability to write SQL code. VERY impressive and in some cases faster than a stackoverflow question. In fact stackoverflow have had to…
Read More

Updated First Responder Kit and Consultant Toolkit for December 2022

Santa’s elves took a break from building toys and shipped a new version of the First Responder Kit. There are some great improvements in here, like a makeover for sp_BlitzLock and much better PSPO compatibility for sp_BlitzCache. Wanna watch me use it? Take the class. To get the new version: Download the updated FirstResponderKit.zip Azure…
Read More

[Video] Office Hours: Great Questions, Part 1

Videos
0
Wow, y’all have been posting some great questions at https://pollgab.com/room/brento lately! Here’s what we covered today: 00:59 Gustav: Hi Brent We recently migrated to SQL MI General Purpose, and I noticed that the default blob storage per .mdf /.ndf file is 128Gb container with 500 IOPS! This is terribly slow! Would splitting the database into…
Read More

Slow “Having” Query? Try Pre-Filtering.

T-SQL
11 Comments
I was helping a client with a query, and I’m going to rework the example to use the Stack Overflow database for easier storytelling. Say we need to: Find all the locations where users have logged in since a certain date, then Return the total count of people who live in those locations One way…
Read More

[Video] Office Hours: Speed Round Edition

Videos
0
I took a break from my Black Friday sale customer support emails to check in on the questions you posted at https://pollgab.com/room/brento and answer the highest-voted ones: 00:00 Start 00:15 Meshulam: What are the top use cases for running SQL Server in a container? Do many of your customers run SQL Server in a container?…
Read More

[Video] Office Hours: Black Friday Edition

Videos
0
My Black Friday sale is in its last days, so most of my time at the moment is spent keeping an eye on the site and answering customer questions. I’m happy to say it’s our best year so far, too! Y’all really like the new access-for-life options. I took a break from the online frenzy to…
Read More

#PASSdataCommunitySummit Keynote Day 3 Live Blog

SQL Server
1 Comment
Today at the PASS Data Community Summit in Seattle, Kimberly Tripp is doing the first-ever in-person community keynote. Here’s the abstract: Over the 30+ years I’ve been working with SQL Server, I’ve seen an incredible amount of innovation and change. How do we keep up with so many changes and how do we know how…
Read More

#PASSdataCommunitySummit Keynote Day 2 Live Blog

#SQLPass
0
I’m in Seattle for the PASS Data Community Summit, and the day 2 keynote is about to start. This year, now that Redgate owns the Summit event, they’re doing the day 2 keynote. Gotta pay the bills, I suppose! Redgate’s CEO, Jakub Lamik, is leading a team of speakers for the keynote, and here’s the…
Read More

SQL Server 2022 Paid Editions Require a Licensing Key.

SQL Server 2022
9 Comments
For the final release of SQL Server 2022, Microsoft popped a surprise that wasn’t in the release candidates: Your choices are: Install a free edition: Evaluation (which times out after 180 days), Developer (which isn’t allowed to be used for production purposes), or Express (which is limited to small databases & hardware resources) Use pay-as-you-go-billing,…
Read More

Join #TeamHugo and Help Fight Leukemia.

#SQLPass
If you’ve been reading this blog for a while or subscribed to my email newsletters, you’ve learned something from Hugo Kornelis. Hugo is the wildly productive and selfless guy behind the Execution Plan Reference, SQLServerFast.com, tons of SQLBits sessions, videos on YouTube, and he’s @Hugo_Kornelis. He’s unbelievably upbeat and positive. He loves what he does, and…
Read More

SQL Server 2022 Release Date: November 16, 2022

SQL Server 2022
7 Comments
Microsoft released SQL Server 2022 today, November 16, 2022. The footnotes indicate: SQL Server 2022 free editions (Developer edition, Express edition) are available to download starting today. SQL Server 2022 paid editions (Enterprise edition, Standard edition) will be available in Volume Licensing (Enterprise Agreement, Enterprise Agreement Subscriptions) customers starting today, which represents the majority of…
Read More

Office Hours: Read This, Watch This Edition

SQL Server
1 Comment
This week, a lot of the questions you posted at https://pollgab.com/room/brento just need pointers to resources at other places. Welcome to the Read This, Watch This series of answers. Don’t Blame Anthony: Our developers prefer writing TSQL queries directly in their .NET code rather than writing sprocs and calling them. What are the pros /…
Read More

[Video] Office Hours: Sponsored By Black Friday Edition

Videos
2 Comments
Y’all post questions at https://pollgab.com/room/brento, upvote the ones you’d like to see me cover, and then I talk through ’em. Here’s what we covered today: 00:00 Start 00:22 CKI: Could please give me pointers how to answer the question “Do we need to create a new instance for the new application or can use the…
Read More