How Many Indexes Is Too Many?
Let's start with the Stack Overflow database (any size will work), drop all the indexes on the Users table, and run a delete:
[crayon-6a79e790b0400189289716/]
Let's start with the Stack Overflow database (any size will work), drop all the indexes on the Users table, and run a delete:
[crayon-6a79e790b0400189289716/]
Let's say we have a couple of update statements we need to run every 15 minutes in the Stack Overflow database, and we've built indexes to support them:
[crayon-6a79e790bc371270480227/]
In my consulting work, I often find myself saying the same things to clients - but they're not the kinds of things I said when I was a database administrator. I call these "Consulting Lines", and I talked through 'em:
https://www.youtube.com/watch?v=qCA0Oz-uk-s
On an unbelievably calm sea day off the shores of Canada, aboard the Norwegian Jewel, I enjoyed a nice cup of completely alcohol-free coffee (as far as you know) and took your top-voted questions from https://pollgab.com/room/brento.
https://www.youtube.com/watch?v=5NzgNMkQ8gU
When your developers work on new queries or testing complaints about existing queries, what database are they working on?
I put together an anonymous one-question poll that only takes a few seconds to respond. Let me know! I'll follow up with a blog post about the responses.
If you want to get a raise or stand out from a crowd of job hunt competitors, you need something to differentiate yourself.
Whenever you finish a training class - including mine - ask if you can get a certificate of completion. For example, here's what mine look like:
While in beautiful Haines, Alaska along the Chilkoot River, I stopped to take your top-voted questions from https://pollgab.com/room/brento.
https://youtu.be/esrXsRZo_gU
I'm on a boat! We took an Alaska cruise with some friends aboard the Norwegian Jewel. En route to Icy Strait Point, Alaska, I took your top-voted questions from https://pollgab.com/room/brento.
https://www.youtube.com/watch?v=VzlKubfSaDs
I recently asked you to leave a comment with your biggest database regret, and the comments were great! Here were my favorites:
Runners-Up
I took your top-voted questions from https://pollgab.com/room/brento while recovering from a late night of partying.
https://www.youtube.com/watch?v=_iS1uJCDmMA
About 10 years ago, Microsoft made changes to the Cardinality Estimator (CE) which caused some problems for SQL Server upgrades. When folks upgraded to SQL Server 2014, they also casually switched their databases' compatibility level to the latest version, because for years that hadn't really affected query plans. They just figured they wanted the "latest and greatest" compat level, without regard to the effects. That backfired badly when they suddenly got 2014's Cardinality Estimation changes.
If you're using TRY/CATCH to do exception handling in T-SQL, you need to be aware that there are a lot of things it doesn't catch. Here's a quick example.
Let's set up two tables - bookmarks, and a process log to track whether our stored proc is working or not:
I went through your top-voted questions from https://pollgab.com/room/brento plus hit live ones from the TikTok viewers.
https://www.youtube.com/watch?v=XDx-OnTHezA
This week's Query Exercise challenged you to figure out why these 3 estimates went so badly:
[crayon-6a79e790bdcd7976602338/]
We all make mistakes.
I certainly have.
I went live on TikTok and took your top-voted questions from https://pollgab.com/room/brento:
https://www.youtube.com/watch?v=R98zeXqpBRQ
Our prior Query Exercise introduced SQL Server's 201 buckets problem: its inability to accurately estimate rows for more than 201 outliers in a table. I followed up with a solution using filtered statistics to help with the next 200 outliers, and I talked about how that's really overkill for the simple problem we were facing in that initial challenge.
Last week, we had an abrupt intro, and this week, we have an abrupt ending when my camera overheats, hahaha:
https://www.youtube.com/watch?v=pQOk2N3ljCc
Let's say you built a web app and it became globally popular. You've got users scattered across North America, Europe, and Asia.
In theory, you could shard your data globally: build 3 sets of SQL Servers, one on each continent, and split up their data.
Today's Office Hours had a ton of technical difficulties because it was my first live stream on both Twitch and TikTok. The first few minutes were cut off, and you can't see the questions onscreen. Nonetheless, there are good answers in here, so let's do it:
https://www.youtube.com/watch?v=Nv0Wnli6kaE