I'm working through some code that I haven't touched recently and I'm running it for the first time on a SQL Server 2012 server. The code is a way to load information into the RML utilities and I started hitting errors. First, I hit an error that my server couldn't be connected to, but thanks to Erin Stellato (blog|twitter), I was able to quickly fix that. Then I hit this: Number of processors: 2 Active proc mask: 0x00000003 Architecture: 9 Page size: 4096 Highest node: 0 Package mask: 0x00000001 Processor(s): 0x00000001 Function units: Separated Package mask: 0x00000002 Processor(s): 0x00000002 Function units: Separated Processors: 0x00000003 assigned to Numa node: 0 -Ic:\performancetuning\rml.trc -oc:\bu -SDOJO\RANDORI Using language id (LCID): 1024 [English_United States.1252] for character formatting with NLS: 0x00060101 and Defined: 0x00060101 Attempting to…
I presented a session at the SQL Saturday event in Oklahoma City last weekend. The event itself was pretty good. The organizers put everything together pretty well and the venue was quite nice. Plus, since I grew up in Oklahoma (Tulsa), it was a chance to go home. The event was good, but my presentation went a little downhill. The name of the session is "Top Tips for Better Stored Procedure Performance." I should rename it to just say "T-SQL Query Performance" because it's not focused on stored procedures, but on queries. The presentation is 1/3 talking about how you write your queries, naming syntax, formatting, etc. The second 2/3 is all about common mistakes made in writing T-SQL such as using NO_LOCK everywhere, nesting views, joining and nesting multi-statement…
If you’re moving to a fully-fledged SQL database as part of Azure you may never even touch SQL Server Management Studio (SSMS). Instead you may do all the management of your SQL database through the Management Portal. You can actually do everything you need to through this tool. This includes writing and testing T-SQL statements. Believe it or not, it includes execution plans. But, if you’re used to seeing this from a query: Then you may be a little bit surprised at this: Believe it or not, those are identical plans. Yeah, the graphics are different, radically so. But the plans, those are the same. I have a small test database that I have loaded into my local server and onto my Azure SQL Server database. It has identical structures…
Wow! How's that for a recap? The concept for the SQL in the City events is pretty simple. Put on a free event that instructs people on SQL Server, Azure, and related technologies along with a healthy smattering of Red Gate tools. All teaching is done by some of the best people in the business (and me). This was the second event in London. The concept was launched there last year and succeeded quite well. This year the event filled it's registrations so quickly that Red Gate felt obligated to have a second day, which almost completely filled up too. There were more than 350 people in attendance on Friday, and then, on Saturday, a day off, another 250+ people showed up. That's well over 600 attendees over the two…
I can't help it. I get really terribly excited when I publish a book. Maybe it should be old hat. Maybe I should be jaded. But I'm just a 12 year old (it's been argued 10) in reality so I get really, really jumping up & down excited when I get that wad of paper and my name is on the cover. It just doesn't seem to get old. What am I talking about? Oh, sorry. Let me explain. After about nine months of work, my new, revised edition, of the Query Performance Tuning book is available. I want to publicly, and loudly, thank Joe Sack(blog|twitter) for the incredible job he did as tech editor. His hard work, and ruthless criticism, made this book what it is. Despite the scar…
I sure hope you’re planning on attending the PASS Summit this year. If you’re not, you might want to reconsider. They’ve just released the list of sessions. You should click this link and check them out. There’s going to be some magnificent instruction available in all aspects of SQL Server. You don’t want to miss it. On a personal note, I’m doing an all-day pre-conference seminar on query performance tuning. It’s called “Query Performance Tuning: Start to Finish.†The pre-con’s, as we call them, are an additional cost on top of the cost of the Summit itself. But you’re flying out to Seattle anyway. Why not attend a full day of learning, walk away with a little more knowledge under your belt. I’m going to give you as much information…
When you execute a multi-statement user-defined function you may see an execution plan that looks something like this: It appears as if the cost of the UDF is free. This is especially true if you use the UDF in a query with other objects, such as joining it to actual tables. Since the optimizer always assumes a multi-statement UDF has a single row for statistics estimates, it' frequently displays a low cost. But you know that there’s more going on there, right? It’s a multi-statement UDF because it’s doing a lot of work, but that is not reflected in the execution plan.. or is it? What if we went after the cache? Let’s run this little query: SELECT deqp.query_plan, dest.text, SUBSTRING(dest.text, (deqs.statement_start_offset / 2) + 1, (deqs.statement_end_offset - deqs.statement_start_offset) /…
Gee thanks Jes (blog|twitter). Just what I wanted, a little extra work on a Friday afternoon. I used to like you. We have a tagging theme started by Ted Krueger (blog|twitter) who I also used to like. The theme is: Deciding that I need to delete and start all over Lordy I hate this one. See, I find it easy to decide that I need to delete and start all over. My challenging task is persevering. But… here’s the rub. Because my challenge is persevering, I have a tendency to try to persevere when I really should be throwing in the towel. I don’t have a technical example of this ready at hand (I did mention it was the afternoon on a Friday, right?), but I do have a presentation…
I say it all the time because it’s worth repeating, feedback is a gift. Good, bad or indifferent (well, not indifferent), feedback is a wonderful gift. Any time you appreciate a speaker, give them feedback. Any time you think a speaker could improve, give them feedback. Any time you hate a speaker, give them feedback. It’s really the best thing you can do. With that in mind, I have a huge stack of gifts in front of me here, the evaluations from the PASS Summit.Thank you very much to each and every one of the 160 different evaluations I received. I presented three times at the summit, once on a pre-con with Gail Shaw called “All About Execution Plans,†one time in a spotlight session called “DMOs as a Shortcut…
Microsoft is supporting an effort by PragmaticWorks targeted at supporting technical training for returning veterans. I can’t think of a single better cause to throw some support behind. Not one. They’re going to donate money based on posts about #sqlfamily. Well done to Brian Knight (blog|twitter) and all the team at PragmaticWorks. I knew you were great people, I just didn’t know how great. Thanks to Microsoft and the SQL Server Team for their support of Brian. Oh, and for all the work you guys do with SQL Server. I may bitch about you guys more than you’d like, but it’s only because I live inside your software, constantly. I wouldn’t be there all the time if you didn’t do great work. Keep it up. We can talk about this…