Getting the full explain plan for long queries

I was recently debugging a large stored procedure (2000+ lines of code) for a customer. I wanted to look at the explain plan for a particularly long SELECT statement in the sproc right in the middle for optimal table design. I opened the statement in SSMS, copied in the text, added the EXPLAIN keyword in…