Posted in SQL Server, T-SQL

Dynamic SQL: Sessions and Execution

I admit it – I do waaayyyy too much with dynamic SQL. But I just keep running into situations that require it. That being said, I ran into an interesting problem that had me puzzled. I found a bunch of different blog posts that pointed to me to the right direction but required a little extra work to find the solution.

There are several concepts that are at play here, so I’ll try to break this out so we can put the pieces together. The first once is centered around dynamic SQL. There are two parts of this I want to make sure we understand first – how it fits into sessions and how it gets executed.

Continue reading “Dynamic SQL: Sessions and Execution”
Advertisement
Posted in SQL Server

I Know Nothing – Execution Plan Edition

Just call me Jon Snow, because like him, I know nothing.

giphy

Or at least, that’s how I feel. In many ways, I feel like a light has gone on over my head. Recently, I’ve been looking something that I’ve been working with for a long time and I feel like I’m really able to understand it.

I’m talking about execution plans. I use them all the time. But lately, I feel like I’ve not been using them correctly at all. I always try to go to as many different sessions that cover execution plans to make sure I know how to read them properly. Despite my best efforts, I’m not sure where I went wrong. But I feel like I should share where I’m starting to get things right.

Continue reading “I Know Nothing – Execution Plan Edition”