How to run query execution plan for parameterized queries?

  • Hello Experts,

    I am curious to know if there is any way out to run execution plan for parameterized queries?

    As application is sending queries which are mostly parameterized in nature and values being used are very robust in nature, So i can not even make a guess.

  • You can pull the plan generated out of cache using dynamic management views such as sys.dm_exec_query_stats combined with sys.dm_exec_query_plan. You can also use extended events to capture either estimated or actual plans, but be very cautious about this. Capturing execution plans puts quite a load on the system. Be sure that you put filtering in place to only capture a small subset of the events.

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

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply