
Huge Performance Issues - Microsoft SQL Server 2000 Security Hotfix Update 8.00.0679
We were surprised by some negative performance hits after some of our
customers upgraded to SQL2000 sp2. We spent quite a bit of time tracking
them down, and eventually realized that certain queries withing stored
procedures (and only those within stored procedures) were using a different
plan after the upgrade. For the most part things were fine, but a few of
the queries now had Index Scan as part of their plan.
SInce the tables were very large, the impact was huge. A query that should
have taken milliseconds was taking 10-15 seconds, AND was acquring and
holding ocks and impacting the rest of the system.
A simple index hint restored the good plan and the millisecond performance,
but it took a while to get to that point. We could not have done this work
without the Profiler, or without scritinizing the Profiler output looking
for trouble. It also took us a while to choose the right Profiler optionsso
that query plans were included in the output.
In our case, we thing the latest SQL Server is probably more aggressive
(ironically) in optimizing queries within procedures, in particular when
variables are used as part of the WHERE clause. The queries that had the
bad plans were very simple, and the index choice was seemingly very obvious,
and yet a clustered index scan was chosen as the best plan.
We verified that this behavior was introduced in the latest service pack,
and verified it on several machines doing very careful before/after the
update profiler traces. I'm not sure if you are having the same or even a
similar issue, but the Profiler was a life saver.
James Hunter Ross