PASS Nominations Committee 2015

PASS
The Nominations Committee has done their job and the final report has been published. Good luck to everyone running. Thank you for stepping up and taking part in this process. This is the first time in a very long time that I don't get to put out a "You should listen to me and vote for..." blog post. Since I'm on the board I feel more than a little squeamish coming out for any candidate. If I openly support Person Y over Person X, have I just yacked off all the supporters of Person X? Have I yacked off Person X? Most importantly, have I potentially poisoned a relationship that I need in order to be effective while on the Board? Add to that the fact that I was ask…
Read More

Yes, Foreign Keys Help Performance

SQL Server
I created this example several years ago that illustrates how foreign key constraints can help performance. It's a contrived example. Granted. I feel like it illustrates the point. However, over the years, people have questioned one aspect of it. The optimizer uses the foreign keys to figure out which tables can be eliminated from the query, making for a more efficient plan and making the query run faster. The pushback has always been, "Yeah, Grant, but nobody writes T-SQL where they include extra tables that they don't need." My initial response, after I stop laughing, is to point out any number of ORM tools. But, you know what, let's assume that's correct. No one would ever create a giant catch-all view that has all their JOINs in one place so they don't have…
Read More

Speaker of the Month: September 2015

Professional Development
Feast or famine. The last several months I just haven't seen that many speakers, let alone that many community speakers. Then, in the last month, I've seen a ton. Contests being what they are though, someone has to win. To everyone I saw speak at SQL Saturday Oklahoma City and SQL Saturday Omaha who doesn't see their name here, apologies. I saw great presentations this month. The winner though is Ryan Adams (b|t) and his presentation: Backup and Restore Tips and Tricks. Ryan started off great, walking around the room, looking people in the eye has he talked and using the slides as a guide, not reading from them at all. He had a bunch of slides that visualized different aspects of backup and restore. I really loved the one…
Read More

Targeted Plan Cache Removal

Azure, T-SQL
A lot of times you'll hear how people are experiencing sudden, intermittent, poor performance on a query, bad parameter sniffing at work, so they'll fix it by running the following code: DBCC FREEPROCCACHE(); BOOM! Yeah, you just nuked the cache on your server because you wanted to take out a single terrorist query. Now, yes, that problematic query is going to recompile and hopefully have a better execution plan. Also, so are all the other queries on your system. That spike in CPU and the slow-down all your business people are experiencing... Your fault for going nuclear. Instead of a nuke, why not use a sniper rifle to just remove the one problematic plan. Here's a little piece of code to help out: DECLARE @PlanHandle VARBINARY(64); SELECT @PlanHandle = deps.plan_handle FROM…
Read More

Time to Change

Database Lifecycle Management
I recently spent two days consulting with a company on their database development and deployment processes. They are a small, capable, team of developers, database developers and a DBA who have embraced the idea that they need to be able to automate their deployments. I wasn't in there to teach them much of anything, but to help walk them through what the possibilities were for their deployments. It was a great experience and I learned a lot. They recognized that it was time to change what they did and how they did it in order to achieve greater efficiencies. They recognized that, while they were successfully building and deploying their databases (a capable team, remember), they were experiencing pain that they could alleviate. Like Peter, it was a time for change. I…
Read More

PASS Board Update: July 2015

PASS
I was actually travelling for most of July and some of that was on holiday with the family, the real family. That's why I didn't get a June update posted. I don't have anything much exciting to report. We're finally getting data out of our Chapter database and can report some interesting stuff. We've added 29 new chapters in the fiscal year of 2015. 10 in the US, 12 in EMEA, 2 in LATAM and 5 in APAC. There's a bunch more. Not sure when it's all supposed to be published, but I'll share some of it now, just 'cause. Our chapters logged 1,405 meetings in fiscal year 2015. That's a pretty serious amount of training. Well done everyone! Thanks for all your work Carmen. I missed the July board meeting…
Read More

Leadership: A Name and A Principle

Professional Development
I'm actively working to put together the leadership course that I talked about here and here. No, not full time. I still have to pay the bills with real work. But progress is going forward. I have an initial name and the principle around which we're going to do this thing: The Data Community Leadership Program will deliver a world-class platform designed to teach technology and thought leadership through direct training and mentoring in order to better grow and develop new leaders within our community. Watch this space for more about the Data Community Leadership Program. Also, this is going to be community driven and run (eventually). Feel free to provide feedback on the name and the principle.
Read More

Generating Estimated Plan and the Plan Cache

SQL Server, T-SQL
Does generating an Estimated Plan cause that plan to be loaded into the plan cache? No.   What? Still here? You want more? Proof? Fine. Let's first run this bit of code (but please, not on your production server): DBCC FREEPROCCACHE(); That will remove all plans from cache. Now, let's take this query and generate an Estimated Plan (CTL-L from your keyboard or by clicking on the "Display Estimated Execution Plan" button on the toolbar): SELECT * FROM Production.ProductModel AS pm; This will generate a trivial plan showing a scan against the Production.ProductModel table. Now, let's run another query: SELECT deqs.plan_handle FROM sys.dm_exec_query_stats AS deqs CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest WHERE dest.text = 'SELECT * FROM Production.ProductModel AS pm;'; That's just an easy way to see if a plan_handle exists.…
Read More

Reading Your Execution Plans

SQL Server
I'm putting the finishing touches on the all day seminar on execution plans that I'll be putting on at DevConnections this year. I have tons of examples to show you how to interpret execution plans as part of query performance tuning. We'll be able to fill our time. However, I've got a pretty high degree of flexibility on which examples I use. With that in mind, I'd love it if you could bring in your own execution plans that you'd like some help reading. I won't guarantee a solution for your query problems, but I promise to read through it and make some suggestions. If you have an execution plan that you don't mind sharing with the group and you'd like a little consulting time on tuning the query, bring it…
Read More

PASS Needs You!

PASS
It's time. No more procrastinating. No more complaining about the process from the outside. No more excuses. You have to run for the PASS Board. The Nominations Committee is all set, off and running. We've got great people involved who are going to do their best to ensure that the community gets the right people to run for the board. However, the NomComm isn't running for the board and the NomComm can't compel people to run. It's up to you to step forward and take on this task. If you've been out there thinking that maybe you need to step up, you do. If you've been thinking that you might be able to give back a little more, you can. If you think you might be the right person to…
Read More