Posts by Kendra Little

Not Everything Should be Automated

SQL Server
22 Comments
How did I ever get this to work???? Some people hate repetition. They want to avoid manual tasks at all costs. I used to be part of the cult of automation. I thought that everything should be made efficient. Why should I do something twice, if I can figure out how to do it once and…
Read More

Should You Be a SQL Server DBA? (video)

SQL Server
24 Comments
Have you ever wondered if you should be a SQL Server Database Administrator? If you think this might be the right career path for you, watch this video and take our quiz! Got limited time or need to restart the quiz? No problem, we’ve got a table of contents with time indicators below. “Should You…
Read More

Is Your SAN Administrator Out to Get You?

SQL Server
9 Comments
WE WANT RAID 10!!!! DBAs often complain about SAN Administrators. “You can’t trust them.” I’ve seen established DBAs write publicly that they resort to lying about how SQL Server works to get what they want from a SAN Administrator. That’s pretty toxic. Other DBAs start to think it’s normal to have a terrible relationship with your SAN…
Read More

Foreign Keys in SQL Server (video)

Foreign Keys
13 Comments
Learn the basics of Foreign Keys in SQL Server: trust, join elimination, cascading deletes, and indexing child keys. Limited on time? Check out the Table of Contents below. Table of Contents: 03:46 – Foreign keys change performance 04:12 – Let’s say we have no foreign key 04:41 – This query has a join 05:05 –…
Read More
Extended Events None Found

Extended Events Sessions: Messing Up Filters

SQL Server
8 Comments
Recently, I wanted to play around with the auto_stats event against a test system running SQL Server 2014. I ran through the session setup GUI and added the auto_stats event. I configured it with a filter (predicate) to only show me auto_stats event in a database named AutoStatsTest. There’s a cost to events that may fire frequently and a…
Read More

Using “OR” and “IN” with SQL Server’s Filtered Indexes

Indexing, SQL Server
3 Comments
You can’t do everything with filtered indexes in SQL Server. For instance, you can’t create the following index: CREATE INDEX IX_Votes_filter ON dbo.Votes (PostId) WHERE (VoteTypeId = 1 OR VoteTypeId = 2); GO 123 CREATE INDEX IX_Votes_filter ON dbo.Votes (PostId)     WHERE (VoteTypeId = 1 OR VoteTypeId = 2);GO If you try, you’ll get the error message:…
Read More

Measuring Performance Can Slow SQL Server Down

SQL Server
9 Comments
I’ve written a terrible query. It might be the worst query in the world. Sure, there are other queries that may be slower, but this query is terrible and elegantly short. The query is gloriously bad for a two reasons: It’s incredibly inefficient in the way it uses a scalar function Observing the query’s performance can make…
Read More

Dropping an Offline Database in SQL Server

SQL Server
22 Comments
When you drop a database in SQL Server, the files are normally removed from the file system right away. POOF! Hope you had a backup if you ran DROP DATABASE against the wrong instance. However, things are a little different if you take the database offline before you drop it. Consider the following code: Transact-SQL…
Read More