Join us on January 8 with Steve Steadman for Rockin' The Code World with dotNetDave - a weekly show to learn & live Q&A focused on .NET and other programming technologies.
AGENDA
Introduction
• SQL Server Performance Tuning and Monitoring
• Database Health Monitor
• Why do developers expect everything for free? This is relevant because I am going through a transition from Database Health Monitor being totally free to it being very inexpensive, or free by participating in other programs.
• From your list: Being an "older" software engineer. Where do the "older" software engineers go?
GUEST SPEAKER
Steve Stedman is a founder and owner of Stedman Solutions, LLC where he and the Stedman Solutions team do SQL Server database work ranging from SQL Server upgrades and maintenance to programming and database corruption repair.
Steve has over 30 years of SQL Server experience working with SQL Server and other database platforms. He has written the book on SQL Common Table Expressions. In 2015 Steve created the Database Corruption Challenge, a weekly event to help DBAs be ready to react when they encounter corruption. Steve was the creator and has been the primary developer on Database Health Monitor for the last 10 years. He regularly blogs at http://SteveStedman.com. Steve also gives back to the local community as a volunteer firefighter and EMT.
C# Corner - Community of Software and Data Developers
https://www.c-sharpcorner.com
#CSharpCorner #rockinthecodeworls #live #dotnet
Show More Show Less View Video Transcript
0:30
Thank you
0:59
Thank you
1:29
We'll be right back
1:59
welcome geeks to the first episode for 2022 of rocking a code world with donet dave i'm dave
2:10
mccarter i'm glad you're all here um i'm i'm so i guess you made it through the holidays without
2:16
killing your family so uh i hope you all had a great holiday season and a happy new year and uh
2:23
um i i still think this is 2020 to tell you the truth uh i don't know what's happened in the last
2:29
two years, especially last year. So I'm going to call this 2020. We need to get those two years
2:36
back. We lost with COVID. But we're still not out of the woods with COVID, everybody. Please
2:42
I'm going to say this at the end of the show too, but please be careful. My two best friends in San
2:47
Diego have it. The young woman I mentor's cousin who lives with her has it. So that basically means
2:53
she's going to get it or she's under quarantine. And so at least with Omicron, it seems like
2:59
there's a lot more people getting it and including everybody. It seems like I know. I've been
3:07
thinking maybe living alone is a good thing during a pandemic because I haven't got it. So
3:12
I'm really happy about that. But anyway, welcome. Steve Stedman is my guest today
3:19
I first met Steve about six years ago in Las Vegas. We were speaking at the same conference
3:25
And I'm going to have him show off the tool that he's created that I really like for SQL Server
3:33
And especially as a developer, I really like it because it makes my job when I don't have a DBA or somebody like that so much easier
3:44
So we're going to be showing off that a little bit in a few minutes and then talk about some other subjects
3:50
So let's get going. So I want to, Simon and I were just working on this before the show
3:57
The .NET virtual conference is in 16 days. I can't believe it's here
4:03
It's almost here already. And I'm proud to announce that the keynote speaker is my good friend, Scott Hunter, director, program manager for .NET
4:12
So he'll be kicking the conference off on the first day, the first hour
4:16
And I'm really excited about that. If you saw a couple episodes back, the episode that Scott was on my show
4:27
his enthusiasm for .NET 6 is really, really infectious. And so I'm sure he's going to bring that to the keynote to kick off this awesome
4:37
three-day free conference for you guys. so please go to dotnetconference.com make sure to block
4:46
up those three days in your calendar so you can come watch
4:50
the sessions live we'll probably be giving away some stuff but we have
4:56
a lot of great sessions we had 132 sessions submitted and so I want
5:04
to thank everybody who submitted the session, I'm very very appreciative of that
5:08
and I picked along with Simon 33 sessions because that's all the time
5:15
we had for three days so for all the people who submitted sessions that didn't get
5:21
picked I'm sorry I really wish I could have picked your sessions and
5:27
I'll put it out there right now all of you everybody who submitted a session is
5:31
welcome to be a guest on my show just contact me and so
5:37
So I'm really sorry. I wish I could accept every single session because they were all great sessions
5:44
But, you know, we have a limited amount of time. So with that said, I hope I picked all the sessions you guys are really, really interested in
5:52
We'll see at the end of the conference and see if I did a good job
5:56
But I tried really, really hard to do a right range of different things, including a lot of the great new things that have been coming out with .NET 6 and Blazor and Azure
6:10
So I hope you join us for those first three days. Right now, the first day is going to be mostly all Blazor-based
6:21
The second day will be mostly all .NET 6, .NET-based. And then the last day will be our more cloud Azure-based session
6:32
So I hope you join us. Put it on your calendar. It's going to be a really fun time
6:40
This week, I released the version 5 of SparGene. SparGene is my open source project for .NET 5
6:50
And I'm going to roll it into .NET 6 in the next couple weeks
6:55
So I hope you go to spargene.net and download the latest NuGet packages
7:00
Spargene basically is all the common code I've been writing ever since .NET 2
7:06
So there's a lot of stuff in the library and there's a lot of exciting new things
7:12
I'll talk about here in the next slide that are in this new version
7:16
So I hope you check it out and check out the NuGet packages
7:20
If you want to look at the code, you can go to GitHub and look at the latest release
7:24
And I hope you check it out And speaking of that that my latest article on C Sharp Corner Just came out Coding faster with Tips SparGene
7:36
And some of the things that are in this new version is something I did on my current contract
7:44
And that is we had to change the password hashing to a more secure way of doing that
7:51
And so I rolled that into my open source project. So I hope you use that
7:56
There's a bunch of different things in there, different algorithms for hashing
8:02
And that's what we're using where I work now. So, and I've also included in the new version
8:07
there's some things in there about string compression and lots more extension methods
8:14
lots more unit tests, benchmarks, all that kind of good stuff. So I hope you check out the article
8:19
all the new stuff and along with other cool features of SparGene are in that article, and I hope you go read it and then check out the Nougat packages
8:29
All right, with that, I'm going to introduce Steve. Steve Stedman is the founder and owner
8:34
of Stedman Solutions, where he and Stedman Solutions team do SQL Server database work
8:39
ranging from SQL Server upgrades to maintenance to programming and database corruption repair
8:45
Steve has over 30 years of SQL Server experience working with SQL Server and other database
8:50
platforms and he's written a book on SQL server, SQL common table expressions
8:57
Steve was the creator and been the primary developer on the database health monitor
9:02
That's the app I alluded to. I want him to show us for the last 10 years and I use his app and he blogs and he gives
9:10
back to the local firefighter community. So welcome, Steve. Hey, Dave. Thanks for having me on the show
9:17
I'm excited to be here. Yeah. Thanks for being here. Steve lives up in northern Washington State, north of Seattle
9:28
And so we're on the same time zone, at least. That's good. So how are you doing
9:32
How are your holidays? They're good. It seemed like kind of a whirlwind season this year
9:40
The holidays were going to go by pretty quick. Yeah, it did. And all the travel craziness
9:46
I'm so glad I didn't go anywhere. Yeah, me too. All those thousands of people being stuck in airports
9:54
And it's a huge mess because of Omicron right now, right? Yeah
10:00
And it always seems like over the holidays, we get dragged into some type of database corruption repair at S&P Solutions
10:06
Over Thanksgiving, we ended up repairing a corrupt database, which is always a lot of fun
10:12
I can't imagine that. I've never, I don't think I've ever had seen a SQL server database corrupt in any projects I was on
10:22
But yeah, that must be a nightmare. Yeah. Yeah. It's always those, the holidays always seem to bring some type of emergency response for some database problem
10:32
That's right. Well, you know, that kind of reminds me of, you know, the McCarter tradition is you land in the ER on the holidays, you know
10:43
Oh, no. I'm serious. I've been in the ER so many times on the holidays. Even as a little kid, I remember
10:50
when I got mumps, it was the holidays. When I got chicken pox, it was the holidays
10:56
That's the McCarter thing. We get sick or go to the hospital on holidays
11:02
All right. Well, you can keep that as your tradition then. I'm not going to take it on as mine then. I don't like it by any stretch, right? It seems that's what happens
11:14
Um, so yeah, welcome everybody. Um, please, uh, if you have questions about SQL server, um, SQL
11:20
all that kind of good stuff, please, uh, uh, put your questions up so Steve can answer them for
11:24
you. He's been doing this for 30 years and, and believe me, you know, having someone's experience
11:30
with databases as Steve is, you know, I wish I had people like Steve on my team at most of the
11:36
places I work because, you know, uh, you know, people like you, Steve are worth, you know
11:43
every penny you guys charge because you know databases are you know i say this over and over
11:48
and over again you know databases are the foundation of applications right oh absolutely
11:54
yeah and i know i mean with what we do at sedman solutions i mean we are kind of like that freelance
12:00
dba and i say it's not just me it's a couple of us on the team and when people need that kind of
12:06
help we can be there when it's needed but not be on the payroll as a full-time employee so right we
12:12
We help out a lot with that. And I think one of the things that's, I don't know, early in my career that always drove me nuts is when like the DBAs would build a wall between like the developers and the DBAs
12:23
And it was almost like the Berlin Wall and you never cross it
12:27
And I think that one of the things we really love to do is to be able to bridge that gap and bring the developers into the database world and bring the DBAs into the development world and get it to a point that it's a win for everybody, you know
12:41
yeah that's why i like doing performance tuning so much uh it's when there's developers available
12:47
it's awesome because you can do the performance tuning and then work with them to change things
12:51
in the code where like if you're doing performance tuning you don't have the developers available
12:55
uh you're really limited on the things you can do although there are still things that can be done
12:59
so yeah and and and like you kind of alluded to i've worked at far too many companies that
13:06
they have a brick wall between developers and database people, you know, and it's, I don't
13:12
know why that exists, but, you know, as a developer, it's horribly frustrating, you know, because
13:18
like I said, you know, we can't work without databases, you know, and, and to make that
13:24
harder, you know, it just doesn't make a lot of sense, you know, and I know people like to protect
13:30
their silos, but come on, you know, we're, we're all trying to release a product together, right
13:35
Absolutely. And I think that that's where, and what we do is so much fun is when you know how to talk to the developers, you know how to talk to the DBAs, you know how to talk to the managers to bring it all together in a way that everybody wins
13:49
Yeah, we have a lot of fun with that. And I think that kind of brings us into the database health monitor tool that we talked about
13:57
in that that's something that when I originally started building it, I was working with a developer and he kept asking me
14:04
well, what's wrong with this and what's wrong with that and why is this blocking and things like that? And there's all these queries I was running to provide answers
14:11
and we eventually just took those and built them into an application that's evolved over 10 and a half or almost 11 years now
14:19
Yeah, so since you brought it up, let's talk a little bit about your database health monitor
14:24
which is free, right, to everybody. Yep. It's free to download. It's free to use. There are some changes we made recently around the licensing with it. And I guess I could point that out right away in that there's kind of this concept of gamification where like right here it says I have a standard license with unlimited instances up top
14:46
but depending on different things you do, you can earn different points to get more connections
14:52
So like being subscribed to our mailing list, you get one point Buying the class on Database Health Monitor gets you 20 points That gets you enough to connect to 20 servers and that covers a whole lot of people so uh it not entirely free per se but
15:06
if you're only using a couple connections there's usually a way to get away with the points uh
15:11
without spending any money yeah and before before you show it off i just want to say
15:16
you know this is actually one of the reasons you know why i've been following you and and
15:22
for a long time now is as a developer and most teams these days are really small
15:31
and unfortunately, though I don't agree with this, far too many teams rely on developers
15:38
doing the database work too. So on those type of teams, I really love your app because as a developer
15:50
you know, who's, who's, who's designed databases before knows basic concepts and can do basic
15:57
things. I am definitely far, far, far from an expert. Right. And so, uh, especially when it
16:04
comes to indexes and, you know, things like that. And, and so your tool, when I'm one or two people
16:10
on a team, your tool has really, really helped me. And, uh, if you want to show it off, uh, as part
16:17
of showing some of the stuff off. One of the things I really liked is the part where it shows
16:22
you how much it's going to cost to fix it. Oh, that's the, uh, yeah. If we look at a database
16:30
here, where's a good one. There's the concept of technical debt. Right. Right. And, uh, yeah
16:36
this is one of those things where it goes through and you can hit yze the database and it goes
16:41
through and looks at some of the best practices and things and saying, uh, comes up and you can
16:46
adjust the score and the cost of people's time and all that, but it comes up and says
16:50
well, here's some things that are kind of against the best practices. And yeah, that's one of those
16:57
things from a development perspective, when you have access to change the code, it's really great. But let me ask you this question. Have you ever launched code? And after that code launch to a
17:06
website or a system, have somebody tell you that things are slow? Okay, but then you don't
17:14
necessarily know, are they slow in the database or are they slow in the code
17:18
Or is it something with a network or a load balancer or somewhere out there
17:22
Who knows where it could be, right? So one of the things I like to use is what we call the historic weights here is this bar
17:27
up top. And I'll drill in on that where you can see day to day, you can see this chart is of how
17:34
many weights are going on. And by weights, whenever SQL server is running a query and it's waiting on something, whether
17:41
whether that's disk or memory or being able to get CPU access or it's blocked by something
17:48
all of those things get logged as weights. And what this does is it shows you over time, and if we zoom the chart out
17:54
we can see that on December 30th, something really big happened here. And if that was a day that you launched code
18:00
maybe that's a clue that something changed in the database that tells you there's a problem
18:04
And we can drill down. I don't even know what happened on 12, but we look here
18:08
Oh, I was doing some testing. So, yeah, I was playing with a bunch of different things, but we can see that with this, you can look and see when you release code and did something change in the amount of weights that were going on
18:23
And that way, if somebody says, well, it seems slower, it helps to pin down
18:28
Is it in the database? And then do you go chase it in the database or is it somewhere else that you have to go figure out
18:33
Right, right. Right. And I think that's one thing people, well, at least developers need to understand that
18:40
when people come to them and say stuff is slow, we always have to look at the code. And most people
18:49
that follow me these days know I'm really passionate right now about performance and quality. And
18:55
you always have to look at the code usually, but I would always want to start off and look at the
19:01
database first, because you can fix the code all you want. You can fix the routers all you want
19:05
You can fix the front end all you want. But if your database is, is the problem, none of that's
19:11
really going to help that much. Right. Yep. Yep, exactly. And if you see, uh, if we go back to that
19:17
two week chart, if you see a spike in weights on the database, then that's going to tell you
19:22
maybe there's something we need to deal with in the database. And with that, we can go and look and say, okay, well, for instance, let me drill back down on a day
19:31
Here's, we can go through and find, okay, here's a stored procedure that I have
19:36
And here's what, just for that stored procedure, here's what the normal weights look like on
19:40
a day-to-day basis. And the weight type associated with that is a CX packet
19:45
And if you don't know what CX packet is, you can double click on it and get information
19:49
And for instance, that's telling you that the CX packet weight is associated with parallelism
19:53
And that's the amount of time that when SQL Server is running your query across multiple parallel threads, that it's taking to bring the results back together
20:01
And that's one of those things that when you look at that and you see a CX packet weight, if that's the number one weight on your system, maybe there's something configured wrong
20:10
But if you're only seeing it on some of your bigger queries, it can be an indication that maybe there's a missing index and there's more work going on there than you might think
20:18
or maybe your statistics are out of date or different things like that
20:23
Maybe there's just a bad join that could be done more efficiently. And so with that
20:28
you can really drill down and find where in your code it's slow
20:32
so you can figure out how to remedy that and make it faster. Yeah, yeah
20:39
Yeah, because like I said, performance is a lot of things can affect performance, right
20:45
And some of those things you don't have any control over, but you know, some of you do. And, and like I said, database to me is always one of the number
20:53
one culprits of performance. You know, I, you know, I've said this, this is a longer story
21:00
but I've said this before a bunch of times that, you know, I was working at this company here in
21:05
San Diego and it was about four to six months before release. And I went to, you know, the
21:11
the managers or whatever. And I said, we can't release this product. And they said, why? And
21:16
And I said, because it's too freaking slow. We're going to lose customers
21:22
And they said, why is it slow? And I go, it's because of the database. I've been telling you guys this
21:28
And they basically acted like, yeah, Dave, you don't know what you're talking about
21:32
And I go, okay, whatever. I told you. And they released it, you know, December of that year
21:38
And guess what happened? We started losing customers. Yep. And that's where, with something like this, we can go and look and see, like, what are the types of weights
21:51
Right. Here, well, this is my test server, so it's not a great, this is CPU bound, is what SOS works at dispatcher often implies
21:58
But you may be able to see from the weight type, is this because your development server is just a little bit slow
22:05
If you added more memory, would that help it? Or if you had faster disks, would that help things
22:09
or you have to go in and change queries or fix indexes
22:13
And I think we get called in a lot of the time to help in situations like that
22:18
where you might have a development team that's really great at writing application code
22:22
But as far as making it run fast in the database, that where they need help And we come in and try and figure out where those problem areas are and then work with them to show how to fix those problem areas Right right And so I haven used your app in a while
22:37
Isn't there one thing, like the first thing you do when you bring up the app is you scan everything
22:42
Is that this page here or is it another page? I forget. So there's what we call the quick scan report
22:49
And what this does, it goes out. And again, this is my test desktop
22:53
So there's a bunch of wacky stuff going on. But it goes out and it scans and it comes back with recommendations
22:59
Things like this database is on the C drive and you get something that's something you don't want to do in production
23:05
But it's my dev box. So it's fine for the dev box. And it shows you things like here. Well, tempDB is slow on IO
23:12
Well, if these numbers are really big, then that's maybe an indication that your tempDB is on, not on the optimal storage
23:19
And of course, this is my dev box and it's on my C drive. So, yeah, that's not a great place for tempDB
23:23
If this was a production environment and I saw that, that's where I'd recommend that you put TempDB on the fastest storage possible
23:30
And then there's security things down here. And this is what we usually recommend is kind of the starting point is go to this and see what we can do here
23:40
And if there's something you don't know about, you can double click on it and it'll take you off to the website for more details on that
23:46
Yeah. And we were talking about indexes. You have you have that page that shows you about the indexes, right
23:53
Oh, yeah, yeah. So if we go look at a database and I can show you one here, for instance, if we go to this one, we can drill down to, and there's a bunch of index reports here
24:04
But one of them I think is one of the more valuable ones is the missing indexes report
24:09
Right, that's the one I used to look at. Yeah. And just like any index recommendation in SQL Server, you never want to take everything here and just do it
24:17
It's here as advice to go act on it if you want to
24:21
But when you look at the cost, what the cost number means is that's all the queries, you know, and if you're familiar with the actual execution plan where it shows you costs, this is the cost number from all those execution plans added up for all the queries that would be helped by this query
24:36
So if we see that by adding this date scanned equity column on this boat history details table, it's significantly more impactful than doing this one on the bottom here
24:48
That's far less. It's less digits compared to this one. And if you want to add that index, you can go ahead and double click on it and choose things like, well, what do we want
24:57
And it would be different if there were inequality columns. But here it gives you the create clustered index script or sorry, non clustered index script and the ability to go just copy that and paste it and go at it real quick if you need it
25:09
Oh, it does create the scripts for you. Yep. So here if we like this one where it has equity columns and inequality columns, this is where it's saying something is less than or greater than instead of equal to in the where clause
25:24
So here we can go and say, turn off the inequality columns and it just creates the index with those things where it's an equal
25:32
And then, or turn on inequality ones and you get more stuff in the index that way
25:37
And with this, you can go and try different indexes and see how they impact the performance on your SQL server
25:43
So this is a great way to go look back and say, based off of the runtime of this server, what are the indexes that we could add that would help overall since the server has been running
25:57
A little bit different than when you're in management studio and you just run a single query and it tells you things you can do to help that one query
26:02
Right, right, right, right. Well, we have some, we have at least one question, I think
26:12
No, not that one. The one that please put your thoughts on database design
26:18
Does database design is more important than application development? Benefits of it
26:24
Well, I don't know if we can answer all the three of these things. But yeah, let's talk about some of that question
26:30
Well, I think, I mean, around database design, absolutely. Database design is important when you're creating your application and when you're building your code
26:41
And when you're expanding that, I see a lot of the times with database design, what people do is they design the database and they do a little bit of load testing and they don't anticipate what's going to happen in 10 years worth of data in that system
26:58
I mean, I've seen this where you've got a table that the developer probably expected a few million rows to be in it, but then after time, there's more than a billion rows
27:07
Well, you've got a whole different performance perspective to look at there
27:11
I think that one of the things that I see in a lot of the performance tuning we do that's one of the biggest challenges is when somebody creates really wide tables
27:21
I'd say like what I call like the one table to rule them all
27:25
Instead of having small narrow tables. Yeah. Yeah. Instead of small narrow tables that link off to different attributes for, let's say, a login or something like that, you might have a table that has 200 columns in it
27:38
Right, right. That's crazy. Exactly. Exactly. But if that's a table that's being hit every time somebody logs in or every time somebody views a page, it has to update like the last access date or something like that
27:51
That can be really, really slow. And that one table could become a bottleneck for your entire system
27:57
Yeah. And that's where things like putting your username and password appropriately stored in one table and storing things like your last access date in a different table
28:09
can really reduce the amount of contention you run into. Right, right
28:14
So I think database design is huge. Is it more, I was a question, something around
28:21
is it more important than architecture or something like that? Is it more important than application development
28:26
Yeah, no, it's not more important. I mean, they go hand in hand
28:31
It's sort of like, if you're making breakfast, is pancakes more important than the sausage
28:36
Well, I don't know. it depends on what you need to make that whole breakfast work
28:40
And I think that the database design is just as important as the application development
28:47
Neither one's more important than the other that, yeah, they totally go hand in hand there
28:52
Yeah. And I, and unfortunately, you know, I keep, I'm going to keep saying this, that most teams I work on, you know
28:58
there's very little design done at all for the database. And, and, you know
29:03
and I've said this a million times before that date developers should not be
29:08
designing databases. Sorry. You know, I don't believe in that, you know
29:14
even though I have done it, but I did it with one of the best database people I know
29:21
So it was both of us together, but, but we are the worst, you know
29:26
and this, this one company that I talked about a little bit ago, you know
29:31
I told them over and over again that this app is going to be taken over by our competitors
29:39
if we don't break down and redo the database, because the database design was done by a developer
29:46
who was barely a developer. So the whole thing, the whole database, our whole problem was that database, right
29:56
As far as it comes to performance and lots of other. things. And, and I told them to, I was blue in the face that we have to redo it. And they would
30:05
never listen to me, you know, and that's why they're not the top and the leader in the industry
30:11
anymore. And interesting. Yeah. Yeah. And, and, and when I say that at conferences and stuff like
30:18
that, the data developers should not be designing databases. You know, I get, I get a kickback
30:23
sometimes going, really, why not? I go, well, do you want your DBAs developing applications
30:28
and their answer is no. And I go, exactly. Yep. And it's one of those things that it's not a put down
30:36
for the DBA to say you shouldn't be writing code or the developer to say you shouldn't be creating databases
30:41
It's just using your strong points. And I think that there are some people
30:47
who have a lot of experience and they've been on both sides, development and database side
30:52
And yeah, those few people can do both sides. But so often we get called in
30:58
where, and this is usually where a company has just become successful enough that their system
31:04
has scaled big enough that they're now having growing pains associated with the database. So
31:09
they call us, we go and look at it. And sometimes it's things like, well, there's no indexes and no
31:14
foreign keys on the database anywhere. Well, that makes it really challenging to access data quickly
31:21
with those two things missing. And we work in environments where we can come in and say
31:29
here's the problem after the fact, and this is what we suggest to fix it now
31:34
to get you through today's hurdle, but here's what we think you should do for the long run
31:40
And then there's other clients that we work with where they're working on new code
31:44
and they have us come in and work with them before that new code gets deployed
31:48
and be able to find those issues. And there's a whole lot of fun things we can do with load and performance testing to be able to slam a database and figure out where those issues are going to be before they make it out there to production
32:00
Right, right. Yeah. I just wish Mark company would hire people like you
32:07
You know, that's, you know, it's, it's, it's, yeah. I wish Mark companies would hire me too
32:13
Yeah, I know. We probably do. Keep us older developers. Like one of the topics that we can talk about is the older developer stuff
32:21
Yeah. It keeps us paying our rent, right? Or the mortgage. So let's, oh, go ahead
32:29
Yeah. And I was going to say, and on that point, I mean, database health monitor is really a tool that I use every single day with
32:36
almost every single client that I work with. And it's such an instrumental part of being able to diagnose and find the
32:44
problems that it's just one of those tools. And that's why we make it available to so many people is so you can do that too
32:51
And every time we come up with an update, we're adding more features
32:55
So there's more tools there for the developer, more tools for the DBA, more tools for everyone
33:00
to be able to use to be able to find where those problems are. Right, right
33:04
And someone asked a question about exports. I'm sure if they go to your website, they can see all the screen grabs and everything
33:11
of your app, right? yeah or i mean you can go and it's it's free to download so just go down and just try it out
33:18
yeah yeah that's what i would do yeah i wouldn't read about it i would just download it and
33:23
play around with it it's it's really even for me it's pretty easy for me to to navigate and
33:29
figure out what things are and you know um and it's something that i mean i've spent 11 years
33:35
or almost 11 years working on it now and i mean that's thousands of hours of my time that i've
33:40
put into it. And there are tens of thousands of people using this application across the planet
33:47
And so it's not just some, I mean, it's, it's something that just, just download it and try it
33:53
And you may get some value out of it. Yeah. Oh, I know you'll get value. I don't think that's even
33:59
a question is you will get value out of it. That's like I said, especially on smaller teams
34:06
when you don't have a dedicated DBA or something like that, or you do have a DBA team that doesn't like to talk to you
34:13
and you have to figure things out on your own, and then tell them, hey, can you do this
34:18
And yeah, I know how it goes. So please make sure to ask your questions with Steve
34:28
about SQL Server or anything else you want to talk about performance and tuning
34:32
Any questions you guys have, please put them in there. you know, I, we, we have a little, we have some time left
34:41
I thought maybe we can hit on those other two subjects that you picked in my
34:47
list that no one else has. So I'm going to at least bring them up now and see, see, see what
34:53
see what people think. So the first thing is, and this is one thing that irritates me a lot. And I
35:00
I will also say that I'm a total hypocrite with what I'm about to say
35:04
but uh uh why do developers expect every freaking thing for free right free apps free everything
35:14
free training free books you know they want everything for free you know and uh you know me
35:19
as a as a that's frustrating for me as somebody who produces these things right because uh um
35:28
everybody wants me to do things for free but you know i don't think a lot of people realizes how
35:34
much time I put into, you know, doing a presentation or doing an article for C Sharp Corner or
35:41
you know, putting on this show, right? Oh, I'm sure. I mean, this show probably takes a ton of your time
35:47
Yeah. Or the .NET virtual conference at the end of this month. You know, we've been working on this for months and I don't get paid for that
35:53
Right. And, and I've, you know, I think one of the reasons that's in my list of topics is because
36:00
I've, you know, I'm trying to, to figure out a way because books don't really sell anymore
36:09
So that's out, you know, DVDs and stuff don't sell anymore. That's out
36:13
Then I tried, you know, streaming videos. No one wants to pay for those, you know
36:18
And now I started putting a subscription on my website for my performance book, basically
36:26
And I have one subscriber, you know? And so, and I, I kind of, I really want more, of course, I was trying that to figure out maybe this is the way you do things these days is just have monthly subscribers to your content
36:42
And I'm not sure if that's working either, but so what are your thoughts around this whole thing
36:49
Well, it's, it's interesting because I mean, I'm kind of a cheapskate sometimes
36:53
I don't want to go pay for something. But then again, I'm also the person who will go and be the first person to pay for it if I can recognize the value there
37:02
Right. And I think that I see there's some environments, sort of the sad environment where a developer might be in a position where they don't have the support of their company or their employer to be able to go and get the tools or do the things they need to do
37:16
that, yeah, that's a challenging situation. But then there's some people that just sort of say
37:21
well I could do that better And you probably right You probably could do it better if you spend enough time on it But if someone else has already spent that time then go use it and get some value out of it And if you get value out
37:35
of it, then yeah, pay something for it. I don't know. I kind of think about it a little bit like
37:41
my son. My son's 25 years old now. He's working. He's a framing carpenter and he loves building
37:46
houses. And the amount of tools as a 25-year-old kid that he buys to go build houses, he's got a
37:54
new hammer with a fancy wooden handle on it. He's got a new, uh, DeWalt power tools. And I mean
37:59
he spends thousands of dollars on equipment just to be able to do his job. And as a framing
38:05
carpenter, uh, very different than the developer world where usually everything's a lot of it's
38:11
just given to us there by the employer to be able to go do that. Right. Where, uh, yeah, he
38:16
it's, it's a different mindset and I don't understand. I mean, I guess with the example
38:21
of my son being a carpenter, he realizes the value. He can get more done. He can get his job
38:25
done quicker if he buys those tools. I think the same thing applies in the development world
38:31
And I don't know. Yeah, it's just a tough call. And I think that sometimes it comes down to the
38:37
value. And if it's something that might be, let's say, I don't know, $300 a year for tool. I know
38:44
Camtasia is one of those tools I buy that's about that price. To me, it's totally worth every penny
38:49
of it. But if I wasn't using it a lot, well, I don't know if it'd be worth it. So maybe I just
38:56
have a different impression there. But I know one of the challenges I've had with Database Health
39:00
Monitor is, I don't know, and maybe it's just getting the mental state that I want to put it
39:07
out there as a way that people can contribute in some way. Because it really has been 100% free
39:12
up until recently, where I added this gamification with points. And I did a Indiegogo fundraiser
39:20
campaign two years ago or three years ago, and I raised maybe $1,500 or something like that
39:25
So it wasn't a lot of money to fund 10 years of development. But I do it because I love doing it
39:33
And even if people don't see the value, yeah, I'm still using it and seeing the value. But I think
39:38
that I hope that anyone who uses it sees the value and could at least like contribute in some
39:44
way there. So, yeah. And in talking about tools at companies, that's one thing I've, again
39:50
talked and written about a lot is, is I just don't understand companies that don't want to pay
39:56
you know, a couple hundred bucks, maybe a thousand bucks a year or whatever for a tool
40:01
that will dramatically impact the value. I mean, what they could do because they bought the tool
40:12
instead of writing it themselves or just not doing it, right? Most teams, and I did a Twitter poll about this
40:19
most teams I've worked on, their companies will not buy them anything, right
40:24
I mean, and one company, they won't even buy them Visual Studio
40:28
They had to use the community edition, right? and I'm serious and and they called themselves a professional development team and I'm going
40:36
come on you know and and but you know so I would say most companies do buy visual studio but beyond
40:45
that you know um visual studio extensions and you know controls and things like that most companies
40:51
won't pay for them and I just don't understand you know why you know they're trying to save a
40:58
couple thousand dollars, you know, where it'll cost them much, much, much more for their
41:03
developer to do it and not do it as good as the tool or the component
41:08
Right. And, and that's why I tell people, I mean, you can have one person write this or you
41:14
can buy one that's written by an army of people. Right. So, so which one do you want? Right
41:20
And how much time do you have, you know, to, to do this? And, and I never understood this with companies
41:27
And it's like you said, you know, your ogy with your son is 100% perfect
41:33
And I've used that ogy before. I mean, you know, if you want somebody to build your home, do you want them to use a hammer
41:39
Or do you want them to use one of those air hammer? Nail guns
41:43
Nail guns, right? Which one do you want, right? The nail gun is going to be better and faster, right
41:50
So why would you pay somebody to take longer and not put the nails in as well, you know, by hand, right? It makes no sense, you know, and I just don't get it. And I wish somebody, if anybody has a comment on why companies are so cheap, please let me know, right
42:13
And it's not every company. I mean, there's a lot of companies out there where they have a good budget for those kind of things
42:20
I think it's the few that outweigh or that maybe are a little bit more vocal about everything having to be free
42:28
Right. So there's a question that's coming in. There are a number of clients that insist on running out support on legacy versions
42:39
And then they don't even upgrade. And then they just leave them there, right? Because they don't want to pay for it anymore
42:43
right yep yeah and uh uh yeah yeah that's true um so here's one of those things since it's just
42:50
you and me talking and we don't want to tell us the whole world oh wait everyone is listening but
42:54
uh yeah i mean there's some clients you work with who have top of the line hardware and they're
42:59
running sql server 2017 or 2019 and they're really up to date on everything and then there's others
43:05
uh that i work with and some of them i don't normally admit this publicly are running sql
43:12
server 2000 still, which, uh, not even supported probably, right? Not even supported 2005 is not
43:18
even supported. And I don't even know 2008, I think is out of support as well too. So it's
43:23
it's that far back. And then they wonder, well, when you're working on this, why does something
43:30
take so long? Well, you're using outdated tools that don't have all of the things that were even
43:36
invented 10 years ago available to use. And I think that, but it always comes down to like a
43:43
cost because let's say you're on that older legacy system. What is the cost or the path to come
43:50
forward to something new? We've done, we've helped with a lot of SQL server upgrades for people that
43:54
way. And sometimes they look and they say, well, we have this application that's already paid for
43:59
that we can't upgrade because we have to go buy a new application
44:05
Right. And, yeah. And the further you get away from something that's not supported anymore
44:13
the worse it's going to be, right? Oh, absolutely. If you wait 20 years to upgrade your SQL server
44:20
you're going to be in a world of hurt for a while, right? Because it's probably not going to go easily, for sure
44:27
Right, right. And most upgrades that you're jumping one or two or even three versions, 2012 to 2017 or 2019
44:35
Yeah, it's not that big of a deal. But if you're jumping 20 years, it's huge
44:43
And the path, nobody would say, well, let's jump from 2000 to 2005 because that might be the easy jump
44:49
Then you've got to jump from there to 2012 and then maybe to 2019. So yeah I think it just yeah there issues there And I know one of the things that I really been I had a lot of challenges because every time I get a call from someone I like to do everything
45:05
I can to help them. I'm a solver. I like to solve problems. But the ones that I can't solve are the
45:12
ones where somebody calls up and they say they've lost their database because they've been hit with
45:16
ransomware now and oftentimes when i hear that it's because they were running older systems
45:26
older versions of whatever yeah and and maybe they're running systems that are not even being
45:33
used anymore that that patches aren't even available uh like sql 2000 or 2005
45:39
but those are the calls I get. And I usually spend a few minutes chatting with them
45:47
trying to understand the scenario, finding out what they have for offsite backups or things like that
45:51
And I find out it's just like, man, you're screwed. I'm sorry. And I, I
45:57
I mean, I presented to him more nicer than that, but it's like
46:01
I'm really sorry, but everything you've got is gone because you didn't upgrade ahead of time
46:07
I mean, you didn't upgrade ahead of time. You didn't have good backups. You didn't have mutable offsite backups, things like that
46:13
Right. And yeah, some of it comes down to budget. And sometimes these are mission critical applications that people need for their business to operate
46:23
I don't know how many times I've heard, well, if we don't get this back, we're not going to be in business
46:28
Right. But six months earlier, they wouldn't have spent the money to upgrade the servers
46:34
Right. So it's kind of a. Or put in the work to do proper backups and stuff
46:39
Yeah, exactly. Exactly. So it's one of those challenges we face. And I guess my public service announcement I'm trying to do for, is just to make as much, make ransomware awareness as much as I can so that people know it's not about what you do when you get, or it's not about if you get hit, it's when you get hit
47:00
Make sure you plan for that. I know we didn't have that on the agenda. No, no, it's okay
47:04
You have to plan for that stuff these days. I mean, that's all there is to it, right
47:09
And unfortunately, that's the world we live in, but that's what it is
47:15
And yeah, there's going to be more and more companies. I mean, we've already had, in America, we've already had lots of problems because people
47:23
weren't keeping stuff up to date or patching things correctly and things like that
47:28
And someone, Andrew here did say that, you know, the buildup of technical debt that alone can cost, destroy the organization and cripple it
47:37
Yeah. Yeah. That's and I think there's going to be more and more organizations crippled because of stuff like this
47:44
Right. Because they don't pay attention and they don't follow what you say or what I say about coding
47:50
and they don't listen to us. And then when they do are in a problem
47:57
it's going to be very costly, take a long time if it's even possible, right
48:03
And that technical debt might be applications that were written 15 years ago
48:08
where we can't even find the compiler they used, whatever version of Visual Studio was used at that point
48:14
And sometimes you're at the point where you have to rewrite your applications
48:18
in order to go to a newer version because nobody even knows where the code is from 15 years ago
48:23
That happens a lot. And even the solution I'm working on right now is like 10 plus years old
48:29
And whenever I do a build, you don't know how many warnings I see about this is not supported, blah, blah, blah
48:38
Even .NET versions are not supported anymore. This NuGet package isn't supported anymore
48:43
Every time I build, I see these things. And I'm going, and part of why I'm there is to slowly try to fix this
48:54
But I can tell you, it is so hard to fix things when so much is going wrong
49:02
Right. And they have not paid attention to this thing in 10 years
49:07
I mean, they have almost 90 Nougat packages that are out of date
49:14
Wow. Right. They have like almost 25 NuGet packages that need to be consolidated
49:20
You know, like I said, there's versions of .NET that aren't even supported anymore they're using
49:26
Right. And it's okay. Well, we're almost out of time anyway. Cheap products are always costly
49:33
Yep. That's true. I had to put issues to a director and explain it
49:39
It's not the IT issue. It's a business risk. Yeah. So does the org value it or not? Yeah
49:44
So it seems like a lot of people like this subject. Maybe we should do more of this
49:50
And you know, that's one of those areas where one of the things, one of the things I present
49:55
on and I have a class on is SQL Server Backup and Recovery. And kind of one of the jokes we talk about as we're going through there is that you either
50:01
need to have a good backup plan or you need to have a really good resume. And I think that, I mean, there's a little bit of, I don't know, snarkiness to that
50:10
But the fact is, yeah, you've got to have a good backup plan
50:14
But I think from the developer's perspective, you've got to have a solid platform that you're building on
50:18
Otherwise, or you just be ready to jump to that next job when the business you're at falls apart
50:25
And it happens. It happens more often than people believe. It does
50:30
Yeah. And people like you are probably called when there's a critical thing happening, right
50:36
And calling you then is too late. I mean, not too late, but it could have been a lot better if they called you before, right? Absolutely
50:44
And I mean, I get probably two calls a month from people who would have been prospective clients that if they called me before they got hit with ransomware, I could have helped them
50:54
But they got hit and they literally lost everything. And that's twice a month that I get calls on that
51:00
Wow. I didn't know it was that much. Wow. Yeah. Yeah. Wow
51:05
We need to hear more about that stuff. Yeah. Well, we're almost out of time
51:10
I do want to say to Andrew and everybody else who's making comments today, especially Andrew, he's made the most
51:15
Thanks a lot for your comments. I mean, that's why we're here. You know, that's why we do the live show and not pre-recorded shows
51:22
So thanks, everybody, for your comments. I appreciate that. I got to let Steve go
51:27
So I've got a couple of questions to ask you before you go
51:34
One is, and I've been thinking about this ever since I thought about having you come on the show
51:40
And that is, I know you're a SQL server guru and know everything about SQL server, but do you have plans to maybe move your health monitor to other database systems
51:52
Or are you just going to stick to SQL? So if the question is other things like MySQL or Postgres, things like that
52:01
Yeah. Or even I was thinking about Cosmos. But yeah, I think that I don't really have the plan for that because so much of what database health monitor does is sort of the core of SQL server. But what I have been doing, and in this release that we just did a few days ago of database health monitor, I'm working to support more platforms like running Amazon RDS SQL server databases
52:24
It a little bit different than having a real SQL server from permissions and a few things like that And I had to do a few code adjustments to make it work So yes we are supporting SQL server on more platforms
52:35
but I don't really have a plan to take it to other non-SQL servers
52:40
Does it work with the Azure SQL? Parts of it, well, it depends on if you're talking about a pure Azure SQL database, no
52:50
But if you're talking about Azure managed instances, then yes, it works with that
52:54
yeah because that's just okay but yeah that's just yeah permissions are a little bit different
52:59
with managed instances of course so yeah yeah yeah well cool um so one of the questions i ask
53:05
all my guests is what do you do for fun besides coding or coding or database stuff yeah i i think
53:12
i i love boating i love fishing boating outdoors things like that i live in the pacific northwest
53:18
north seattle where there's a lot of water puget sound that area san juan islands we do a lot of
53:24
boating out there. Uh, but yeah, for me, what I do for fun is I guess a lot of boating
53:32
Well, I'm glad you said that because if I ever make it up there, I'm going to hit on you to take
53:37
me boating. Cause I, I love boating. I used to be in the Navy and, uh, and I just don't get to do
53:43
it much anymore. Cause you know, having a boat in Southern California is fricking expensive. And so
53:48
that's, you know, out of my league for sure. Um, well, I'm in the Pacific Northwest. Look me up if
53:53
head this way. Well, the next time I come up there, we're not having an MVP summit again, but
54:00
I might just come up just to come up to see my friends I've missed for the last two or three
54:06
years. All the Microsoft people I know and MVPs and stuff like that. And the last thing, of course
54:14
is besides the SQL, your health monitor, do you have anything to plug
54:19
Oh, I'm going to just go back to the private or the chat channel there where Charlie Earhart, Charlie threw in something about mentioning that I have a free course on ransomware
54:30
Oh, there it is. So I've got a number of classes that I sell
54:34
If you go to stevestedman.com slash school, that will redirect you to all the classes I have
54:39
And, but one of them that I'm just so passionate about stomping on all these ransomware people that I took the ransomware section out of the backup and recovery course
54:51
And I made the ransomware part available for free because I think it's far too valuable to make it, get it, to get as much ransomware awareness out there as possible to people
54:59
I'm giving that away for free. So check it out. If you go to stevestedman.com slash school, some, yeah, the links in there, uh, that'll get you over to the classes
55:08
well Simon put up the link and uh you know Steve I really appreciate you uh being on I want to have
55:14
you on again uh and maybe we can get to the third the third subject uh we didn't talk about and
55:20
that's being an older developer well so we'll be a little bit older by the next time we get together
55:25
I know I know so um have a great weekend I really appreciate it and uh and I'll see you next time
55:32
and keep an eye on C Sharp Corner and the conferences we're doing
55:36
and submit sessions, you know. Oh yeah, I'd love to do that
55:40
Yeah, yeah. So thanks for having me. This has been a good time. Yeah, me too
55:44
Thank you very much. Well, that was great with Steve. I got a lot out of that session
55:52
and I hope you did too. And like I said, again, I really appreciate all the comments
55:58
You know, I know it's because what time of day it is
56:02
but my show, we don't get a lot of comments. And so I really appreciate all the comments
56:06
that were done today. So keep them coming next week and the other shows we have
56:14
And I said this when I was complaining about software engineers being cheap
56:20
I do have a new page up on my website all about code performance
56:27
There are some articles for free, but there's other articles. you can sign up for $5 a month
56:32
and for subscribed content. And that's where the harder core subjects are
56:40
And I'm working on a new article right now about performance for C Sharp Corner
56:45
and another one for C Sharp Corner too. It will come out after that
56:52
But please subscribe to my site. My retirement fund will really appreciate it
56:58
And it's five bucks a month. and as every week everybody wins a copy of code rust from dev express if you go to dev express.com
57:10
slash donat dave you can download your very own free free registered copy of code rust code rust
57:17
is the refactoring tool i've used ever since visual studio came out i love it it makes me a
57:23
much more productive developer and one thing i tweeted about i think um early this week is uh
57:29
You know, in the project I'm working on right now at work, I'm just going to share this quick little story because this is one of the reasons I love CodeRush
57:39
They have unit tests. And when I was trying to do some testing this week, you know, I did, you know, run test, you know, in Visual Studio and they wouldn't run
57:50
It just said it didn't find any tests to run. And I'm going, there's tests right there
57:54
It's a whole test class. I don't know why you're not running it. You're not telling me why you're not running it, but you're not running it
58:00
And I need to run them. And I remembered, oh, I have CodeRush
58:05
So CodeRush has a feature called TestRunner. And I fired up TestRunner, ran all the unit tests fine, no problem
58:14
So that's what I'm using on this project from now on is TestRunner
58:18
That's part of CodeRush. And also TestRunner runs unit tests faster so you can get back to coding and stuff
58:27
So that alone is a reason just to get Code Rush. It's just for Test Runner if you ask me
58:33
but there's lots of other great features, hundreds and hundreds of great features of Code Rush
58:38
So go get your copy of Code Rush. Let me know how you liked it. I recently did a Twitter poll
58:48
I can only talk about this for a minute or so, but this is a really big pet peeve of mine
58:54
And my poll based on, you know, the current code base I'm working on, you know, software engineers, do you write comments in your code
59:03
I wasn't really specific on what type of comments I was talking about, but, you know, 54% said always 26 when I'm forced to
59:13
So almost half and half, basically, and which I think is very, very bad
59:18
And especially, you know, the project I'm talking about was the same one I was talking about with Steve
59:26
That's it's over 10 years old. And so basically every developer who worked on the beginning is gone
59:33
Right. And unfortunately, because of the hiring practices or whatever this company does, there's a lot of turnover and they hire a lot of contractors
59:42
And so guess what? There's not a lot of comments in their code and why they did things this way and opposed to another way
59:52
Or why did they do this? It doesn't make sense. You know, things like that
59:57
Or why did you exclude this class from code coverage? you know, stuff like that. And it, as a developer, who's, you know, is an expert that's hired to come
1:00:07
in and help fix code, make it better, make it more performant, make it better quality. It's horribly
1:00:15
horribly frustrating for me when there's no freaking comments, you know, and are very little
1:00:22
comments. Right. And I'm talking about the comments within the code and, you know, hardly anybody
1:00:29
comments methods in classes anymore. I don't know why, but even comments within the code. And I know
1:00:34
code should document itself. Believe me, I know that. And it should for the most case, but you
1:00:42
can't document everything by the name of the code or the name of the method. You have to write
1:00:48
actual comments on why this is happening or why did you do it this way and things like that. So
1:00:54
So my whole thing with this is please comment your code as much as you can
1:00:58
It doesn't hurt anything. It only improves the code base, especially when you're looking at that code base six months, a year, 10 years later, and trying to figure out what the heck is going on in here and why
1:01:12
You'll greatly appreciate those developers who took just a little bit of time and wrote some comments in their code
1:01:19
It doesn't take a lot of time, people. right so please comment your code the more the better you can't do enough if
1:01:27
you ask me all right there's my spiel for this week also speaking of code
1:01:38
commenting there I have a whole section on code commenting and other kind of comments in my book coding standards for Microsoft I hope you pick it up It only available on amazon
1:01:51
It's now available in Australia, I think. And so please, please, please pick up a copy of the book. It's not an ebook. It's a real book
1:02:00
This one needs to be a real paper book right next to your desk so you can refer
1:02:04
to it all the time. So it's not an ebook. So I hope you'll pick it up
1:02:11
I have a fundraiser going on right now. My friend, I haven't looked at it because I've been ill lately
1:02:19
My friend said it's almost $500 now. So if you go there, I'm going to donate all that money to the Voice of Slum NGO in India this weekend
1:02:30
So please go to that URL and donate what you can. This is the orphanage I visited in 2019, the last time I was in India
1:02:39
and it was literally the most moving experience traveling the world. And ever since then, I've been trying as hard as I can to raise money for this organization
1:02:53
and the two awesome people who run it who are an inspiration for me, at least
1:02:58
And so anyway, I go there. If you don't trust me, go to their website, voiceofslum.org, and just donate directly
1:03:07
They need all kinds of supplies for the kids, including school supplies and clothing and things like that
1:03:13
So everybody that's listening to this show can help out. So I hope you go help out one way or the other
1:03:19
With that said, thanks a lot for watching. Next week my guest will be someone I talked to a bunch of times not on the show Daniel Roth from Microsoft he like the Blazor guy So if you into Blazor or if you want to know about Blazor this is the man
1:03:40
So he's the guy that helps me out at Microsoft. So he's going to be on next week
1:03:47
So I'm really excited about Daniel coming on. Please be safe out there
1:03:52
Like I said at the beginning of the show, all my best friends in San Diego
1:03:57
have COVID. The young woman I mentor, cousin has COVID. And so she's about to get COVID
1:04:04
So please be safe. We're not out of this. Unfortunately, I keep saying this every freaking
1:04:09
week. I wish I wasn't saying it, but this is the way we, this is the way it is right now. So
1:04:15
please wear your mask. Please get vaccinated. Please listen to your medical professionals
1:04:20
and please, please go donate at your local blood bank. All blood banks around the world
1:04:30
are in a dire need of blood right now because of COVID. So I donated a week or so ago
1:04:36
I'm almost 14 gallons, I think now. And so please, please donate blood
1:04:41
It's free, it's easy, and it makes you feel better because you helped in three
1:04:47
one blood donation can help three humans. And so that makes me feel good by donating blood
1:04:57
So please go donate blood. If you have any suggestions, comments for the show
1:05:01
if you have anybody you want me to invite on the show, please email me at rockincodeworld at csharpquarter.com
1:05:10
And with that, thanks a lot. I glad you back Happy 2022 And I will see you next week
1:05:43
Thank you
1:06:13
Thank you
1:06:43
We'll see you next time
#Health Conditions
#Windows & .NET
#Computer Education


