SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Execution plan display change from 2005 to 2012


Execution plan display change from 2005 to 2012

Author
Message
ErikMN
ErikMN
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 429
I was wondering if anyone could help me with something that I've noticed now that we've upgraded our SQL version from 2005 to 2012. We have a number of stored procedures that pass in a list of INT IDs from the application and the developers generally call a stored procedure from inside the main stored procedure to put the values in the table. The stored proc is called GetTableIntFromString and does a loop through the string to put it in the table. This doesn't cause any issues in 2005, but when I point SSMS at a SQL 2005 database and run one of these stored procedure that calls this looping stored procedure, I don't get the plan for the nested stored proc call.

When I look at the same query plan pointed at an SQL 2012 database, for the nested proc call, I get the entire plan for the proc call including every time through the loop in the query plan for the main proc. The problem I run into is that this either makes the query plan so big that it errors before I can see the whole plan or at the very least makes for a lot more scrolling while looking at the plan.

Is there any way to make the query plan output from the 2012 database not display the full plan for the nested proc call? If I need to look at how the nested one is performing, it's easy enough to do on it's own, I don't need to see the full thing every time it's used especially since it's making things that I do need to see not appear.
Gianluca Sartori
Gianluca Sartori
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9996 Visits: 13351
Have you tried using SQL Sentry Plan Explorer?
It shows plans in a more compact way and can display individual plans in a batch.

EDIT: Oh, last but not least, it's free.

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
Grant Fritchey
Grant Fritchey
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40881 Visits: 32666
Instead of trying to capture the plan live, just get it from the plan cache using sys.dm_exec_query_plan. You can combine it with sys.dm_exec_sql_text to identify the specific code you're interested in.

And those plans can also be opened by SQL Sentry Plan Explorer.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
ErikMN
ErikMN
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 429
I've been meaning to take a look at SQL Sentry Plan Explorer for a while now. I installed it today and it looks like it solves my biggest problem looking at the query plan for these in SSMS since I can just skip the loop. It'd still be nice to have some way to ignore or group the information from the nested proc, but this fits my immediate need and also looks to have some other time saving features built in.

Thanks for the help!
Gianluca Sartori
Gianluca Sartori
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9996 Visits: 13351
You're welcome.
Don't overlook Grant's advice. It will probably be easier to extract from the cache, even though you won't have all the information stored in the actual plan.

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search