Index Statistics

T-SQL
The other day a developer showed up at my desk. They were getting time-outs in production on a query that didn't normally give them trouble. With the parameters they provided, I ran the query. It ran for over 30 seconds, the application side timeout, before it returned it's data. So I ran it again with an execution plan. It had a bunch of index scans with loop joins across thousands of rows and even created a table spool with 700 million rows as part of the process. Clearly not good. Next I looked at the query plan. It wasn't too bad, as these things go. It was probably moving too many columns and apparently the business wanted a pivot on the data since they were using an aggregate method to pivot some…
Read More

JumpStartTV

SQL Server, T-SQL
All the videos I recorded on execution plans for JumpStartTV are now available. Please, go and check them out. Then hang around JumpStartTV and check out all the videos that Brian Knight did on SSIS. Also, if you're interested, I think Andy and the team would like other people to submit videos as well. So if you're watching my stumbling attempts and are convinced you can do better, do it and submit it.
Read More

Video Lessons

SQL Server, T-SQL
A while back, I wrote a book, Dissecting SQL Server Execution Plans. Because of it, I had some conversations with Steve Jones & Andy Warren. For a SQL Server geek, heady company. Anyway, they asked me what my plans are for the book. Plans? I wrote it. I thought that was the plan. But they meant lessons, licensing and all that kind of stuff. I didn't have a clue, but they did. A few weeks ago I flew down to Florida and recorded a bunch of short video lesson plans derived from the book and from discussions with Andy Warren. It was a blast. They've now been published over at JumpstartTV. I hope you find them useful. I had a blast doing them and learned a lot from Andy and…
Read More

VSTS 2008 Database Edition GDR CTP 16

Tools, Visual Studio
CTP 15 utterly hosed the virtual device I had it on. I tried uninstalling, but it just wouldn't come off clean. I finally have rebuilt the virtual and reinstalled everything except VSTSDB GDR. Having learned my lesson (the hard way as usual), I started a differential on my virtual for the install of CTP 16 so that I can roll back and install the release candidate and the release as they come out without having to go through that whole rebuild thing again. While Gert & crew are still making some changes, the fundamentals are still there so my presentation at PASS should work fine as currently defined. The only problem I ran into was that I couldn't get the database to deploy by simply clicking on the deploy menu…
Read More

PASS Summit

PASS, Tools, Visual Studio
It looks like this year is going to be pretty good. They've expanded the program. If you're not going, you should consider it. Personally, I'm pretty excited. I'm presenting our build and deployment process using Visual Studio Team System Database Edition. I've got the first half of the presentation down cold because it's how we've been doing our deployments for a couple of years now. The second half concerns me a bit. I'm showing the new release that works with SQL Server 2008. Unfortunately that new release isn't done and I keep having to update my code and slides as the new versions come out with different functionality. I'm more than a little bit nervous about that part of the presentation. I wish there was a way to bounce it…
Read More

Query Fingerprints and Plan Fingerprints

nHibernate, T-SQL
SQL Server 2008 has been released, but the full capabilities of the product are still be discovered. This isn't a case of discovery so much as Microsoft, in the person of Bart Duncan, has shown us something new. Read the article. This is one of the most exciting things I've seen in a long time. It's especially exciting as we see databases becoming less and less manageable through the implementation of tools like nHibernate. As I noted in a previous post, nHibernate will create a lot of execution plans. With the capabilities here, we'll be able to easily and quickly aggregate some of those plans to identify the costly queries coming out of nHibernate without having to resort to 24 hour Profiler monitoring. Great stuff.
Read More

Training and Learning

SQL Server, Tools
I think these are usually two different things, but most people conflate the two. There was a great discussion over at SQL Server Central based on an editorial by Steve Jones. It's worth reading through to see how people learn or get themselves trained. One common theme is reading books. I'm looking at stacks of them all over my desk, so it would be hard to deny their use. If you too like to read, then I've got something for you. Red Gate is doing a promotion where, when you purchase SQL Tool Belt, you can also download five E-Books offered by Apress. Several of them look pretty interesting, so this is a good deal. Not to mention, if you're not using some of the tools from SQL Tool Belt already, you're…
Read More

SQL Server 2008 Install, cont.

Tools
OK. Hopefully you're all reading this stuff BEFORE trying to do the install and certainly BEFORE uninstalling everything in sight. The latest version of SQL Prompt, version 3.9, is 2008 compatible AND doesn't cause this problem with the install. So, I've got to reinstall the software. Time to track down my license. I hope I kept that email.
Read More