We have a table that is freshly loaded with data each day.
After the data load and additional updates on the table, a particular sp (with several sub-sp's in it) performs very slowly. However, if we recompile the sp by running it or doing an ALTER on it, it seems to "fix" the problem most of the time (temporariliy at least, until the next data load).
What could be causing this?
We've thought of several possible causes:
* updated statistics on the table causing new execution plan
* recompilation of the sp slowing things down
* data needs to be loaded into memory again
I'm going to run a profiler on it, but just wondering if there any OBVIOUS reasons for this behavior. I'm not a tuning expert.
Thanks
After the data load and additional updates on the table, a particular sp (with several sub-sp's in it) performs very slowly. However, if we recompile the sp by running it or doing an ALTER on it, it seems to "fix" the problem most of the time (temporariliy at least, until the next data load).
What could be causing this?
We've thought of several possible causes:
* updated statistics on the table causing new execution plan
* recompilation of the sp slowing things down
* data needs to be loaded into memory again
I'm going to run a profiler on it, but just wondering if there any OBVIOUS reasons for this behavior. I'm not a tuning expert.
Thanks