Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
marconi8
Yak Posting Veteran
73 Posts |
Posted - 2003-05-11 : 08:26:24
|
| i send to y sp input parameter which will be interpreted how sql string, but how to get execution plan of this king spi can see only select components, but i cannot see what exactly reads where executed by sp, index seek or index scani can examine this by only one way, to copy string and execute this string manually, idependly sp |
|
|
simondeutsch
Aged Yak Warrior
547 Posts |
Posted - 2003-05-11 : 10:37:21
|
| If you are trying to get the execution plan for dynamic sql (sql string that you pass in as a parameter, which then gets parsed and executed within an sp or batch), you cannot do that unless you do it manually. The downside to using dynamic SQL is that there is NO execution plan for the string until it's actually run, because the optimizer has no way of knowing what's going to be in it. Besides, you should be aware that even if you run it manually and get a plan, the plan might change if the string's parameters change. If you will post more information, the people here might be able to help you get rid of the dynamic SQL for better performance.Sarah Berger MCSD |
 |
|
|
|
|
|