Hello all,
I've written a stored procedure which runs OK for the
first few thousand records it processes, then around
about the 10,000th record it suffers a sudden and dramatic
drop in performance (from about 40 records per second to
about 1 per second).
I've found that when this happens, if I run an UPDATE STATISTICS
query on the affected tables, performance picks up again,
which is good. However, this is a query that will be
running unattended, so I thought that I good idea would
be to put the UPDATE STATISTICS statement in the stored
procedure and have it run after about eight thousand records
have been processed.
However, I find that even though the statement is run
after the 8,000th record, the performance drop *still*
occurs after the 10,000th record. I find this odd because
the statistics have just recently been updated. Is there
anything else I should be looking at?
TIA,
--
Akin
aknak at aksoto dot idps dot co dot uk
I've written a stored procedure which runs OK for the
first few thousand records it processes, then around
about the 10,000th record it suffers a sudden and dramatic
drop in performance (from about 40 records per second to
about 1 per second).
I've found that when this happens, if I run an UPDATE STATISTICS
query on the affected tables, performance picks up again,
which is good. However, this is a query that will be
running unattended, so I thought that I good idea would
be to put the UPDATE STATISTICS statement in the stored
procedure and have it run after about eight thousand records
have been processed.
However, I find that even though the statement is run
after the 8,000th record, the performance drop *still*
occurs after the 10,000th record. I find this odd because
the statistics have just recently been updated. Is there
anything else I should be looking at?
TIA,
--
Akin
aknak at aksoto dot idps dot co dot uk
Comment