Archive | January, 2011

Winter Nerd-Cation: I’m Talking about Isolation Levels in Cleveland on February 5 (#SQLSat60)

Cerealizable: Breakfast Isolation Level A few weeks ago I was talking with a friend about upcoming plans. Without thinking, I said: “Oh, and I’m going to go to Cleveland to talk about Isolation Levels. And partitioning. In February.” There was a  pause. My friend laughed. I believe she called me a nerd. I took it as a compliment. What Makes A Great Nerd-Cation To me, the best, most relaxing vacation… (Read Me)

Internals Matter: Why You Should Check Your Page Verify Settings, and I Should Go to Masters Immersion Training (SQL Skills Contest Entry)

This post is about two things: 1) Your Page Verification Settings are Critical You should confirm you are running with the correct page verification settings on your SQL Server databases. It’s very important, and I’ll show you why. 2) I Should Attend the Awesome SQLSkills Master Immersion Event – Internals and Performance My scripts to demo the importance of page verification settings are part… (Read Me)

Corrupting Databases for Dummies- Hex Editor Edition

Corruption is so ugly it gets a lolworm instead of a lolcat. Let’s make one thing clear from the start: This Post Tells You How To Corrupt a SQL Server Database with a Hex Editor in Gruesome Detail And that’s all this post tells you. Not how to fix anything, just how to break it. If you aren’t familiar with corruption, corruption is bad. It is no fun at all on any data, or any server, that you care about. Where… (Read Me)

Read from the Right End of the Index: BACKWARD Scans

Optimizing queries is the most fun when you don’t need to add indexes. There’s nothing quite so nice as finding a way to make reading data faster, without slowing down writes or creating new data structures that need to be maintained. Here’s one way you can use BACKWARD scans to do this. The Scenario: Clustered index on an increasing integer, and you’d like recently created rows This is a common… (Read Me)

Writing a Technical Blog: Why to do it and what to write about

Recently I read Paul Randal’s ( blog | twitter ) post, “So you want to blog about SQL Server?” and it got me to thinking. Why do I blog about SQL Server, anyway? Why do I recommend it? Write out of selfishness. I do! Yep. This blog is me doing something for me. And it works: it helps me a lot. Writing blog posts isn’t easy. Most posts some require lots of thinking, putting together scripts, scratching… (Read Me)

2011: More Nerdy Drawrings (TSQL Tuesday #14)

TSQL Tuesday, 2011 Style…This month’s #tsql2sDay is hosted by Jen McCown ( blog | twitter ) and Jen’s question is “What techie resolutions have you been pondering, and why?” And a quick congrats to Ms McCown on her new SQL Server MVP Award! I Resolve to Draw More Geeky Pictures Last night I wondered, “How would I draw a picture of the Storage Engine?” So that’s what… (Read Me)

Date Rounding Tactics and the Tiny Devil of SMALLDATETIME

Tiny Devils With every new year I think a little bit about time and dates. This posts looks a little more at that in TSQL. Rounding Dates: Which way is best? Sometimes in TSQL you need to round a datetime value to the precision of either a day, hour, minute, or second. I realized recently that I have a few ways I know how to do this, but I wasn’t sure which was the most efficient. I did a little searching and didn’t find… (Read Me)

Filling in Data Potholes Redux: Tally Tables vs CTEs

In A Previous Installment Re-Ducks … our heroine (that’s me) rediscovered CTEs, specifically in the recursive style. That was in my post “Filling in Data Potholes with Recursive CTEs.” To recap: I was working on a problem with gaps in temporal data. The basic scenario was: Imagine that you are writing a script that looks at data grouped by the minute. You notice that there are no rows for some… (Read Me)