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 |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-05-11 : 09:43:43
|
| I have got a sp which does a SELECT on a table.This table does not have an Index.After creating the index i found that the sp is using the index. Which is very nice.I just want to know why the sp is NOT using the old execution paln?I beleive noramally old query plan will be used from cache..------------------------I think, therefore I am |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-05-11 : 10:09:18
|
| Because you changed the index structure for the underlying tables. This causes a recompile of the execution plan so it can find the most appropriate path to execute the query.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-05-12 : 12:25:22
|
| This is interesting. Never knew this. So i beleive when ever indexes are created query plan will be re-created if they are in the cache. Other than updating the query plan what extra activites sql engine will perform at the time of index creation?------------------------I think, therefore I am |
 |
|
|
|
|
|