"lazy"stored procedures
Posted in 1997
Hello,
The performance of several stored procedures degrades sharply with time.
That is, I have procedures that do very simple queries over big tables
(200000 rows) that return immediatly when executed short time after being
created.
However, some time (hours) later, the procedures seem to "slow down",
taking a lot of time to execute (say, 45 seconds for a simple select!).
The same query run directly from dbaccess executes immediatly.
The table has (and has always had) the appropiate index, and no massive
data loads have been performed. Data is rather static.
Dropping and recreating the procedure, or simply running update statistics
for procedure xxxx solves the problem... for some hours.
What should I look for? I emphasize that I have not added, dropped or
recreated the index, nor altered any significative ammount of data in the
table. Engine is Online 7.2
Thanks in advance.
-- Oscar Goldes
-- Orden Argentina SA