473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

SQL2K: Performance Problem with a query after Security Patch Ms03-031

After applying security patch MS03-031 (Sql server ver 8.00.818) a
query that used to execute in under 2 seconds, now takes over 8
Minutes to complete. Any ideas on what the heck might be going on?

I have tested this extensively and can say for certain that installing
this hot fix is what has caused the performance problem. I just don't
know why or how to fix it.
Brian Oster
Jul 20 '05 #1
3 3014
Brian Oster (bgoster@swbell**nosmap**.com) writes:
After applying security patch MS03-031 (Sql server ver 8.00.818) a
query that used to execute in under 2 seconds, now takes over 8
Minutes to complete. Any ideas on what the heck might be going on?

I have tested this extensively and can say for certain that installing
this hot fix is what has caused the performance problem. I just don't
know why or how to fix it.


And it is even more difficult to say from a distance. It is not likely
that the security fix as such is the culprit, but there might be other
fixes that were bad for you.

To actually "prove" that the hotfix is the cause, you would have to
build two different environments, and then run the query in both.
Even if you are not looking for proof, but only a solution, this
might still be worth the effort, so that you can compare query plans.

If you can come that far that you can actually produce a complete
repro that creates the table(s), populates it/them, and the runs
the query, I will glad forward that script to Microsoft for con-
sideration. However, since this would take quite some of your time,
I fully understand that you don't want to do this.

A milder alternative is just to post the tables, the indexes and the
query. Maybe there is some simple improvement that can be done to
the query.

You can also opt to open a case with Microsoft. If they accept the
change as a bug, you should be refunded for expenses you were
charged for the case. However, performances problems are always a
bit iffy. If they judge that your query was poorly written, you may
not get a refund. (I should add that at this point I am completely
speculating. I have very little personal experience of MS Support.)
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
On Mon, 15 Sep 2003 21:31:35 +0000 (UTC), Erland Sommarskog
<so****@algonet.se> wrote:
Brian Oster (bgoster@swbell**nosmap**.com) writes:
After applying security patch MS03-031 (Sql server ver 8.00.818) a
query that used to execute in under 2 seconds, now takes over 8
Minutes to complete. Any ideas on what the heck might be going on?

I have tested this extensively and can say for certain that installing
this hot fix is what has caused the performance problem. I just don't
know why or how to fix it.
And it is even more difficult to say from a distance. It is not likely
that the security fix as such is the culprit, but there might be other
fixes that were bad for you.


I can say for certain that the installation of the hot fix is what
breaks the query. Now, could it be that something else is really the
culprit and the hotfix simply "exposed it".... could be. I guess I
was kinda hoping I'd get about 20 responses of people saying something
to the effect of "...you moron, this has been posted 200 times in the
last week... read the FAQ for the solution..."


To actually "prove" that the hotfix is the cause, you would have to
build two different environments, and then run the query in both.
Even if you are not looking for proof, but only a solution, this
might still be worth the effort, so that you can compare query plans.
This is exactly what I have done. Actully used 3 different servers to
test it. As soon as I apply the hotfix... query dies. Same tables,
same indexes, same sql, etc.


If you can come that far that you can actually produce a complete
repro that creates the table(s), populates it/them, and the runs
the query, I will glad forward that script to Microsoft for con-
sideration. However, since this would take quite some of your time,
I fully understand that you don't want to do this.

A milder alternative is just to post the tables, the indexes and the
query. Maybe there is some simple improvement that can be done to
the query.
Well since I needed an immediate solution, I was able to "code" around
the problem in my app. What concerns me is that something else might
"break" and it would be nice to know the nature of this problem which
might aid in solving the next one that might pop up.


You can also opt to open a case with Microsoft. If they accept the
change as a bug, you should be refunded for expenses you were
charged for the case. However, performances problems are always a
bit iffy. If they judge that your query was poorly written, you may
not get a refund. (I should add that at this point I am completely
speculating. I have very little personal experience of MS Support.)


I have no doubt that they would judge my query to be "poorly
written"... hell, I'd probably agree. :) But the fact of the matter
is that for about 5 months the query returned a result set in under 2
seconds until the hot fix was applied, at which point the query took
over 8 minutes to return a value. Too me that is a performance hit
that is simply too large to be discounted as JUST a performance issue
and, IMO, is some sort of a bug.

Appreciate the response. I will let the higher up powers decide if
they want to pursue it further w/ MS. I just have concerns that there
is an issue with our install of SQL server and/or the hot fix and
instead of resolving the issue we created a work around w/o really
knowing the root cause of the problem.

Brian Oster
Jul 20 '05 #3
Brian Oster (bgoster@swbell**nosmap**.com) writes:
I can say for certain that the installation of the hot fix is what
breaks the query. Now, could it be that something else is really the
culprit and the hotfix simply "exposed it".... could be.
Well, what I tried to say is this: the security fix is for named pipes.
It seems unlikely to me that this could affect the query plan. However,
it is not unlikely that there are other post-SP3 fixes in that build,
and it is one of those fixes affects your code.
I guess I was kinda hoping I'd get about 20 responses of people saying
something to the effect of "...you moron, this has been posted 200 times
in the last week... read the FAQ for the solution..."


Unfortunately, it is not that simple.

Let me stress that I have absolutely no knowledge of what fix may have
caused your problem. But I can provide a generic discussion.

Recall that SQL Server uses a cost-based optimizer. This means that
SQL Server determines the query plan for a query by looking at histograms
of the distribution of the values in the columns involved in the
query, and combined with the available indexes, the SQL Server chooses
what it *thinks* is the best plan. I believe that for complex queries
SQL Server may not evaluate all possible plans, but may go for a plan
that looks "good enough".

Most of the time SQL Server is successful. But sometimes it goes wrong.
There may be a correlation between the data in two columns that SQL Server
is unaware, which causes it to decline a good plan. And of course,
statistics may be incorrect or out of date. But with auto-statistics
this is not that likely.

Nevertheless, bad plans appear. I recall that I had a complex 11-table
query, which first had to fix when we moved from SQL 6.5 to SQL 2000,
as it was intolerably slow at our bigger sites. A little later I had to
look at it again, because now the new version was slow at a site
which had a smaller amount of data! (But small enough for that plan
that SQL Server opted for.)

Every once in a while, Microsoft makes changes to the optimizer. I
understand that you think it is a bug when it causes your query to
crawl like a snail. But what if the change that caused this, makes
ten other queries go faster?

Note, I am not saying that are such changes. The change might well
be a pure bug, where SQL Server simply makes another decision than
the developers had intended.

I fully understand if you don't find what I say here fully satisfying.
But this is the same with any enterprise DBMS. You have a cost-based
optimizer, and that optimizer is just a very complex guessing game.

I think you also understand now, that the fact you are alone to see
a problem with this fix, is not so strange as it may seem.

Finally, one thing you could try, is to run UPDATE STATISTICS WITH
FULLSCAN on all tables involved in the query. Not that I think that
the odds are that great, but in case you have some time to spare,
you could try it and see what happens.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephan Eberle | last post by:
Hi @ll... I wanted to code a small proxy-like program for testing purposes. Another application binds to a local port 12203 and listens there for incoming datagrams and sends datagrams. My proxy...
1
by: Ben M. | last post by:
Greetings all, This should be an easy task, and Im sure it is, but as many times as I have tried, I cant seem to get this to work properly. We changed ISPs recently from a shared host to a...
2
by: Jens | last post by:
Microsoft Security Paradigmes are Irritating. I sure they're fine once you know what they are, but for the uninitiated it's quite counterintuitive to work with. I moving an old SQL...
3
by: Otmar Ganahl | last post by:
Hi! In my application I transform a docbook file to a html view using the webcontrol "Xml" (with a xsl).It works fine, except the using of the tag "fileref" in the docbook-file will cause an...
9
by: Christian Wetzig | last post by:
hi, i have a table with test_field of type "TEXT". when i do: select test_field from test where id=1; the connection (with psql) hangs and no output is received, so i have to kill psql. ...
1
by: Terrell Miller | last post by:
I have an Access front end with ODBC drivers to a SQL2k box. All our security is Wiondows-authentication on the back end, we don't use Access security workgroups. THerefore when I try to get the...
1
by: ferg | last post by:
Hey folks, I'm only beginning to understand the ins and outs of programming, let alone C# and thing like ADO/CDO etc etc, but I'm on my way to trying to develop a User Help Desk solution on...
2
by: Carlo Marchesoni | last post by:
I have a Crystal Report that accesses one table in a very simple Access Database (no user no password). When Exporting the report to PDF format, the browser gives the following error: Logon...
17
by: 57R4N63R | last post by:
I'm currently building a website for one of the client. There has been few errors here and there, but just recently the problem is getting worse. Basically the symptoms is that when the user try...
5
by: Michael Rudolph | last post by:
Hi newsgroup, I have an issue with the configuration of a DB2 federated database (WebSphere Information Integrator) in conjunction with the relational wrapper for Oracle on AIX. DB2 seems to not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.