Tag: Humor

  • Cursors Without Performance Penalties

    One of the very common ways that many developers learn to write code is through loops. Almost every language as some sort of FOR and WHILE looping structure. Many people build these in T-SQL, which often creates performance issues as the engine inefficiently deals with the RBAR (row by agonizing row) processing.

    That seems like it might change in the next version of SQL Server. There is an interesting research paper from the SQL Server team that explains how they are investigating a technique that will make decode the inner workings of any code that is inside a cursor and apply the work efficiently to any table operations. If this actually turns out to be true, then cursors in T-SQL might be like cursors in PL/SQL, where this is the preferred way to write code.

    Suddenly cursors will have no real performance penalty. If that’s the case, I suspect we’ll start to see lots of new refactored code in many organizations. Loops make sense and are easy to read. I don’t know that I’d change any existing code, but I’d consider changing new code. Do you feel the same way? I wonder how many of you would prefer writing loop based code as opposed to complex single statement SELECTs.

    I’m not sure when we’ll actually change our habits, and you probably agree if you clicked the link. Today is April 1, or April Fool’s Day, so this whole thing is completely fabricated. Hopefully you smiled and this helps you cope with the day a little better.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher or iTunes.

  • Looking Back at the Decade

    I started a thread on Twitter,looking back at the decade in pictures. I had a hashtag (#decadeofmemories), but there are lots of those. If you’re interested, flip through my feed from this tweet back.

  • The DBA’s Twelve Days of Christmas

    On the first day of Christmas my new DBA sent to me
    A table with a primary key

    On the second day of Christmas my new DBA sent to me
    Two Foreign Keys, and
    A table with a primary key

    On the third day of Christmas my new DBA sent to me
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the fourth day of Christmas my new DBA sent to me
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the fifth day of Christmas my new DBA sent to me
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the sixth day of Christmas my new DBA sent to me
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the seventh day of Christmas my new DBA sent to me
    Seven maintenance jobs
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the eighth day of Christmas my new DBA sent to me
    Eight tables to remove
    Seven maintenance jobs
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the ninth day of Christmas my new DBA sent to me
    Nine unit tests
    Eight tables to remove
    Seven maintenance jobs
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the 10th day of Christmas my new DBA sent to me
    Ten database containers
    Nine unit tests
    Eight tables to remove
    Seven maintenance jobs
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the 11th day of Christmas my new DBA sent to me
    Eleven Extended Events
    Ten database containers
    Nine unit tests
    Eight tables to remove
    Seven maintenance jobs
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

    On the 12th day of Christmas my new DBA sent to me
    Twelve tickets already closed
    Eleven Extended Events
    Ten database containers
    Nine unit tests
    Eight tables to remove
    Seven maintenance jobs
    Six unnested views
    Five execution plans
    Four database roles
    Three stored procs
    Two Foreign Keys, and
    A table with a primary key

  • The Costumed DBA

    It’s Halloween today, which is a day when children typically dress up and go looking for candy. It’s supposed to be trick or treat, but I’ve seen relatively few tricks and lots of treats with my kids. No Halloween for me, and likely a quiet day as I get ready for travel to Seattle and try to relax at home for a few days. My kids are grown and no others come to my house out in the country.

    More than a few adults will dress up in costume today. Some will come to work in an outfit, which is something I’ve done in the past. In my 20s, I’d wear a gorilla mask and hands, frightening more than a few people who weren’t expecting a hairy hand to fall on their shoulder or hand them a report. I haven’t done that in years, and I think those days are behind me.

    Some people will dress up at night, going out to have fun at a party. Surrounded by others that are enjoying themselves, or competing to see how creative you can be is fun. Perhaps you dress up to take your kids out and enjoy the night with them.

    Many of us do need to work today, as Halloween isn’t a holiday in most organizations. We’ll have various experiences at work, maybe a horrific day when we break something with the wrong click or poorly structured code. Maybe we’ll do something heroic that saves the day, or at least helps someone else.

    With today a costume day, I want to ask you which character, hero, icon you’d like to emulate in your daily work. Is it a computer scientist like Alan Turing? Maybe Iron Man that flies in to rescue a disaster? Maybe you’re the fireman that shuts down a problem. Let us know what costume you’d like your work to wear.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher or iTunes.