Identifying Frequently Running Queries

SQL Server, T-SQL
It's not enough to look at the longest running query. What if you have two queries, one runs for 5 minutes and the other runs for 5 seconds. Which do you tune? The first one, of course. But, let's add a little information to our thought experiment. The one that runs for 5 minutes is called 2AM, your local time, when there are almost no users on the system and the one that runs for 5 seconds is called 40 times a minute all day long. Now, which one do you tune? That's right, suddenly that 5 second query takes on a HUGE significance based on how often it's called. But how do you know how often a query is called? The easiest way to gather that information is not…
Read More

Editorial on SQL Server Central

Misc, Tools
My first one over there. It's discussing whether or not you should do two things, build your own monitoring tool, come out in particular favor of one tool or suite of tools from a single vendor. Please read it and watch the video. And, even more importantly, leave a comment in the discussion.
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

Performance Studio

Tools
I just found out about some new functionality coming out in SQL Server 2008 called Performance Studio. It's actually largely a framework around which you can build performance monitoring routines for an entire enterprise. This sounds terrific. I'm going to dig into a bit and make it my presentation for the Heroes {Community} Launch event at SNESSUG next week. Here's a Technet webcast on the topic. Here's a very nice blog entry over at SQLTeam (I suppose I should ad them to my blog roll) discussing the function of the Data Collector, the foundation for this new framework. Performance Studio only works with 2008 systems though, so that's something to take into account. Although I see an interview with Brad McGehee that says it's not enterprise ready. Another something to take…
Read More