Twitter

Entries in PASS (12)

Tuesday
Jan312012

PASS Summit 2012–Register Now And Save

It’s the end of January and the price of attendance to the PASS Summit 2012 is about to go up.

Today you can register for $1,095 (that’s 50% off the full price). Tomorrow that price goes up. Get in now and save some bucks. The price only goes up by $100, but with you having the option of pre-purchasing the Summit DVD set for $125 when you register. That means by registering today you can get all the sessions delivered to you for only $25. Now THAT is a bargain.

Thursday
Dec082011

PASS BoD–Who I’m Voting For

Hopefully everyone who reads this is a member of PASS and has received a ballot for voting in this years Board of Directors elections.

There’s a really strong candidate turnout this year, it makes for tough choices when it comes to voting. I was able to pick my three, I’m going to tell you who and why.

*None of the following is endorsed by any candidate, nor have I mentioned that I am writing this post to any of them. The thoughts and feelings expressed as regards each candidate are my own. I am not being negative towards any of the other candidates either, and nor should you be. I am just looking at the positives for these three as I perceive their value on the Board.

 

Rob Farley

I first got to meet Rob at the PASS Summit a couple of years ago and found him to be an all round nice guy (despite the fact that he is an Arsenal supporter). He’s worked very hard to build his business back home in Australia and by all accounts been very successful in doing so.  Rob has already shown great dedication to the community which can be shown by virtue of his being an MVP for the past 6 years.

Rob brings a great many things to the table. The one thing that I really feel makes him a standout candidate is how he fits into the future of PASS. A great deal has been talked about how PASS needs to grow internationally. Rob is a part of the international market. Indeed his different perspective was acknowledged by the current Board when they brought him in as a non-voting member earlier this year.

Rob really seems to care about this stuff. Enthusiasm is infectious and I believe he will kick start some different thinking.

 

Adam Jorgensen

I don’t know Adam. I’ve never met him, but I know of him. He’s the President of Pragmatic Works; on the board of their foundation for getting teachers and veterans back to work in technology; SQL MVP and PASS regional mentor.  Community really seems to be at the core of everything that Adam does (highly commendable stuff).

Again, Adam brings a lot to the table, the key thing for me is his financial experience. There were delays in getting the PASS budget approved this year. It’s not something that the Board wanted to happen or intended. Budgets are always tight and with planned international expansions and additional things like SQL Saturday and SQLRally events I think someone with a firm understanding and great experience with business financials would be a bonus to the Board.

 

Kendal Van Dyke

I’ve met Kendal a couple of times briefly (you know how PASS can be crazy that way).  He started MagicPASS down in Orlando and was on the planning team for the first SQLRally event. Kendal deservedly received his first MVP award this year (he was one of those guys where you go “wait, he’s not an MVP?”)

There were a couple of things that really piqued my interest as regards Kendal’s platform. Firstly his wanting to work with the virtual chapters. I feel that they are very neglected right now from a Board perspective. I think a great push needs to be made for those. We get hundreds of people for every 24HOP presentation but the numbers are very low for the Virtual Chapters. Getting the word out about them and having a solid push in that direction from the Board would go a long way. Second was his desire to work with PASS partners and work on mutual benefits with them. I think it would be a good thing for PASS membership to go beyond folks just getting a vote. We really need to find a way to grow membership and engage people further. I feel that this may be a way to do achieve that.

 

 

Get out and vote

Or rather sit on your rear and click some buttons. If you have a ballot go and vote. It’s important you help put people in place that are going to affect how PASS will impact you in the future.

You have until December 20th to get your vote in.

While I’ve stated who received my vote there are other candidates, I encourage you to check them out and see if they might be a better choice for you:

Monday
Oct242011

PASS Summit–Instant ROI

When you turn to your boss and tell them that you want to attend the PASS Summit then you are more likely than not to be asked the dreaded “What’s the return on investment that we would get by paying for you to attend or by giving you the time off to attend?”

Sometimes that can be a little hard to answer, especially if you are asking for extra money to attend a precon or two.

I thought I’d share an immediate return on investment that happened the day after I got home from the Summit where I used information that I had learned from a precon to fix a production problem in a fraction of the time than it would have taken me to figure out the problem before…

 

Houston, we have a problem

I received a call from the NOC saying that there were timeouts happening in production and this was impacting customers. They needed someone to take a look and figure out the issue.

I VPN’d in and saw that CPU on the system in question was running at 99% and there was a great deal of database blocking and a whole lot of spids waiting for resources. Knowing that this server usually sat there quietly humming along with only around 20% of it’s CPU being used I knew there was a serious problem. A quick ask and I learned that there had been no code changes released on either the database or application side so it was time to dig in.

 

What’s running?

With there being no changes it was time to start digging further. I turned to the comfort blanket of sp_whoisactive to dig further.

One of my favorite aspect of sp_whoisactive is that by default it shows you the sql_text for the running spids. This allowed me to very quickly identify that the same piece of code from one of our stored procedures was causing a problem. The update looked pretty simple:

UPDATE TOP (@rcdcount)
        [dbo].[TableWithIssue]
SET     [Session_Id] = @Session_Id
      , [Dtm] = @Date
OUTPUT  inserted.[Id]
      , inserted.[Val]
      , inserted.[Dtm]
        INTO
  @tblOutput
WHERE   [Id] = @Id
        AND [Used_Dtm] IS NULL
        AND ([Dtm] IS NULL
             OR ([Dtm] IS NOT NULL
                 AND [Dtm] < @Date
                )
            ) ;

When I threw a sample execution of the proc into SSMS and took a look at the plan things appeared to be very much off

image

 

There’s a lazy spool that has a cost of 304% and the clustered index update costs 1228%? That’s a little off.

Time to break out another favorite… SQL Sentry Plan Explorer

image

Ok, this was something much more readable. It adjusted the associated costs and made it quick and easy to understand. Because Plan Explorer is very flexible it’s actually possible to just show costs based upon CPU. As this was where my problem was I decided to adjust it to show more relevant data.

 

image

Aha, all of a sudden the worst offender has changed from the clustered index update to the clustered index scan. That’s where I need to focus on the changes.

 

Breaking things down

Time to eliminate the clustered index scan. That should resolve everything.

The first thing was to take a look at the predicate. Hitting F4 in SSMS brings up the properties window of whatever object you have selected, in this case by choosing the clustered index scan I was quickly able to grab the predicate:

[mydb].[dbo].[TableWithIssue].[Id]=[@Id]
AND [mydb].[dbo].[TableWithIssue].[Used_Dtm] IS NULL
AND ([mydb].[dbo].[TableWithIssue].[Dtm] IS NULL
OR [mydb].[dbo].[TableWithIssue].[Dtm] IS NOT NULL
AND [mydb].[dbo].[TableWithIssue].[Dtm]<[@Buffer_Date])

Removing the duplicate columns from this I wound up with just three columns for the predicate:

Id
Used_Dtm
Dtm

 

Next I checked the output list:

Id
Session_Id
Dtm

 

The Id and Dtm columns are in the predicate list so this left me with just the Session_Id column in the output list.

This indicated to me that creating the following index would eliminate the index scan and provide me with a vastly improved index seek:

CREATE INDEX idx_TableWithIssue_Used_Dtm 
    ON dbo.TableWithIssue (Id, Used_Dtm, Dtm) 
        INCLUDE (Session_Id)

 

Before creating the index I went through and confirmed that there were no other indexes that might potentially cover this query with a slight change, however there was just a single clustered primary key in place with a column that would not be included in this new index.

I added the index, which took about two minutes and then recompiled the stored procedure.

CPU immediately dropped to 10% and things started humming along. I pulled up a new query plan and threw it into Plan Explorer:

 

image

 

Much better.

 

That was easy

Certainly seems that way. Without the stuff I picked up in Gail Shaw (blog|twitter) and Grant Fritchey’s (blog|twitter) precon it would have taken me a lot longer to figure out exactly where the problem was and what was needed to be done to fix it. Their guidance on reading execution plans really helped guide me quickly to the problem, understand the data that was presented and implement a solution in a minimal amount of time.

Return on investment? Fixing a production down issue in 20 minutes as opposed to two hours. Is that worth the price of a precon? Yeah, I’m pretty sure it is.

 

Final notes

When I first dealt with this issue I mistakenly thought that the lazy spool was the reason for the high CPU load, just because when I added the index it went away. After doing some further reading and really understanding how they work in a little more detail I realize that it’s vanishing was just a byproduct of adding the index (and indeed it’s replaced by an eager spool in a different part of the plan).

While this was an easy way to show the ROI for that particular precon there was so much more at the Summit than can just be realized by this one incident. Ongoing items while at work which may not be as visible are also improved by the knowledge that I gained. An understanding of SQL 2012 features like AlwaysOn groups will help decide whether we should implement the next version when it comes out as well as provide guidance on where we should or should not deploy certain features. It all adds up.

The fact is that my job didn’t pay for me to attend the Summit this year, nor did it pay for me to go to either of the precons that I attended. Given that there was a lot of out of pocket expense did I find a return on investment for myself? I sure did. I know that I’d rather being doing something fun than spending 2 hours in front of my laptop on a Sunday afternoon trying to figure stuff out.

 

 

Such fun!

Friday
Oct072011

Summit 2011–Getting A Seat At The Table

If you’ve attended the Summit then you might have seen a bunch of tables near the back of the room with a whole bunch of reserved seats. The tables are manned by crazed looking folks, laptops lit up, fingers flicking over the keyboard as events unfurl on the stage in front of them.

These fine folk are bloggers and they have been presented with the opportunity to get comfy chairs and write about the keynotes. Liveblogs update and tweets flutter their way into the ether as they get incensed about Tina Tuner impersonators or wowed by the straightforward technical awesomeness and presentation skills shown by David DeWitt.

This year PASS opened up the opportunity for folks to enter into a raffle to get one of these coveted seats.

I was lucky enough to get one of those seats, so on Wednesday, the opening keynote I get a seat at one of the tables. I’ll have my tablet setup, tweetdeck running and will be hoping that the keynote will not be a repeat fiasco of last year (although it’ll be great fodder if it is).

Look for something interesting coming to my blog Wednesday and follow me on twitter (@sirsql) to see what I have to say.

 

Such fun.

Friday
Sep022011

Being Inappropriate At The Summit

Last year Sean & Jen McCown (you might also know them as the Midnight DBAs) put on a little event called "Inappropriate PASS". It was a smallish gathering of 30 or so folks who wanted to give and watch presentations that were a little on risque side. 

There were drinks, noms, curse words a plenty and enough stuff to make you laugh that your sides hurt. A fun time was had by all in attendance.

With the Summit coming up in a little over a month planning is well underway for this years event. To help with the planning Jen is asking for some feedback for possible attendees (those of you that will be at the Summit and those of you that live in the local area. Please go to http://www.midnightdba.com/Jen/2011/08/important-inappropass-survey/ and fill out the 30 second survey. 

I think you should seriously consider joining us for a couple of hours of craziness and should put some serious thought into something that you would like to talk on for 5 minutes. Nothing is off the table or out of bounds so bring your worst. It's going to be a blast.

 

Such fun.