Presentations in Action

Misc
The first book I read for my 12 goal oriented books was Jerry Weissman’s Presentations in Action: 80 Memorable Presentation Lessons from the Masters. Up front, let me say, this book met my expectations. I expected to see a lot of things I already knew. I expected to learn a few new things. What I didn’t expect was more books for my reading list. The book is broken down into 80 little stories and these are grouped into five sections talking about Content, Graphics, Delivery Skills, Q&A (dealing with it, not your questions), and Integration. The sections made a lot of sense even if a couple of the stories felt like they had been sort of shoe-horned into the section. Most of the stories made a lot of sense, and…
Read More

Make the Optimizer Work Harder

SQL Server
One of my favorite indicators for whether or not you have a good execution plan is when you see the “Reason for Early Termination” property in the TSQL operator like this: The optimizer considered this particular plan “Good Enough.” which is what you want to see. When you see “Timeout” as the reason, that’s an indication that the plan you have may be sub-optimal. The question is, can you make the optimizer spend more time on your queries. Well, actually, the question is, should you make the optimizer spend more time on queries. During my session on SQL Cruise I answered the original phrasing of that question, no. As usual when I present in front of people smarter than I am, I was wrong. Brent Ozar (blog|twitter) pointed out that…
Read More

Rebind and Rewind in Execution Plans

T-SQL
Ever looked at an execution plan? If you answered no, you can’t possibly have ever tried to tune a query, or, you’re doing it wrong. For every one else, no doubt you’ve looked at the tool tips or the property sheets of an operator and you’ve seen the Rebind & Rewind properties and wondered what the heck they mean. Me too. I learned as much as I could for the book on execution plans and I spent two pages describing it. Then, a little while ago, on the SQL Cruise, someone asked me to describe them and I was flummoxed. Specifically they said the explanation in the book was insufficiently clear, so I promised to put together a blog post on the topic, both to attempt to clarify my explanation…
Read More

Time for a Little PD

Misc
No, PD doesn’t stand for PowerShell Development. It stands for Professional Development. Sharks either swim or die (and yes, I know that’s not 100% accurate, but I need a hook on which to hang this lesson). Knowledge workers either develop more knowledge or become buggy whip manufacturers. It’s that simple. Keep moving/learning or die/become obsolete. I’m voting for continuing to learn. In keeping with this, during SQL Cruise Alaska (I’ll be posting more on my thoughts about the trip), I was privileged to sit through Buck Woody’s (blog|twitter) presentations on “Three C’s on the High Seas.” Buck is a great teacher and not at all afraid to hand out homework, which he did before and during the cruise. Confession time, I did fail to do one pre-cruise assignment and Buck…
Read More

SQL Cruise Alaska 2011

Misc
Yes, I went on the SQL Cruise to Alaska. Yes, it was as grand as you've heard. Yes, I'm going to be putting up a series of blog posts about it. This is the first. It's also part of my class work done during the cruise. Three Reasons for Choosing to Cruise 1. My first, and most important, reason for coming on the cruise is because I thought it would be good for Red Gate Software. I’m still figuring out how to do my job as a product evangelist, so I’m experimenting with contacting audiences in as many ways as I can. This is one way to make that contact. 2. Frankly, I thought it would be fun. Fun because I knew a bunch of the people running the show…
Read More

Optimizer Timeouts with XQuery

SQL Server
I was looking at performance of a database and I noticed a few of the plans were very large and timing out in the optimizer. This made me wonder, just how many of them were timing out? This sounds like a job for XQuery! There’s really nothing to it. Once you start plucking stuff out of the execution plans using XQuery, it’s kind of hard to stop. So here’s my little bit of code. WITH XMLNAMESPACES(DEFAULT N'http://schemas.microsoft.com/sqlserver/2004/07/showplan'),  QueryPlans AS  (  SELECT  RelOp.pln.value(N'@StatementOptmEarlyAbortReason', N'varchar(50)') AS TerminationReason,         RelOp.pln.value(N'@StatementOptmLevel', N'varchar(50)') AS OptimizationLevel,         --dest.text,         SUBSTRING(dest.text, (deqs.statement_start_offset / 2) + 1,                   (deqs.statement_end_offset - deqs.statement_start_offset)                   / 2 + 1) AS StatementText,         deqp.query_plan,         deqp.dbid,         deqs.execution_count,         deqs.total_elapsed_time,         deqs.total_logical_reads,         deqs.total_logical_writes FROM    sys.dm_exec_query_stats AS deqs         CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle)…
Read More

Oh ****!

SQL Server
Did you ever accidentally close SQL Server Management Studio? And, in closing SSMS, did you get the prompt that says “Save changes to the following items?” And did you, completely unthinkingly, with a query you had just been working on, hit Cancel? Yeah, me neither. What kind of idiot does that…. OK. I confess. I just did that. Silly thing it was, but I had just spent at least 1/2 an hour working on a query and now it was gone…. or was it? I had just run the query and had been looking at the results when I closed SSMS. Initially, I panicked and started thinking about how I could get the data back (somewhere there’s a file I’ve heard). Then it occurred to me, I had just been…
Read More

SQL Azure Query Tuning

Azure
SQL Azure is still SQL Server at the end of the day. This means it is entirely possible to write queries against SQL Azure that really… what’s a good word… stink. So what do you do? It’s all in the cloud. You couldn’t possibly tune the queries, right? Wrong. Many of the same tools that you have available to you, such as execution plans and dynamic management objects, are still available in SQL Azure. Let’s talk DMOs for a second. First off, don’t make the mistake I did of trying to run these outside the context of a specific database on SQL Azure. You’ll get extremely inconsistent results, trust me on this. Anyway, I did a quick run-down on some of the most used DMOs for performance tuning, the sys.dm_exec_*…
Read More

Summit Preference Voting

PASS
This year the PASS organization is asking us to vote on the PASS Summit 2011 sessions, not as a means of picking them, but rather as a way to tell where there interests that may not be fulfilled. However, we all know it’s down, to a degree, to a popularity contest. I’ve already posted my sessions on this blog and asked you to vote. I’m not even going to link to it. If you’re interested, you will, if not, why bother you. What I am going to suggest is a few sessions by others that you might not have picked. First up, Jes Schultz Borland (blog|twitter) put on this excellent session at SQL Saturday in Chicago called Make Your Voice Heard! She’s put it in at the Summit for a…
Read More

SQL Rally

PASS
The first ever SQL Rally was held just last week. It was an excellent time. The event was organized and run by PASS. Which means, in  effect, it was a like a mini-Summit. I’m struggling a bit to come up with the words to describe what the event was like. It was so much more than a long SQL Saturday, but describing it, as I just did, as a mini-Summit mischaracterizes it as well. I guess it must be it’s own critter. Let me just tell you what went on, maybe that will help. The event was held at a very nice hotel, the Marriott World in Orlando, Florida. The Rally proper was two days long, but there was a set of pre-conference seminars held the previous day, making the…
Read More