473,851 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP: Strange Blocking Performance Problem with Simultaneous Queries

Hello everyone, I am hoping someone can help me with this problem. I
will say up front that I am not a SQL Server DBA, I am a developer. I
have an application that sends about 25 simultaneous queries to a SQL
Server 2000 Standard Edition SP4 running on Windows 2000 Server with
2.5 GB of memory. About 11 of these queries are over views (all over
the same table) and these queries are all done from JDBC but I am not
sure that matters. Anyway, initially I had no problem with these
queries on the tables and the views with about 4 years of information
(I don't know how many rows off hand). Then we changed the tables to
replicated tables from another server and that increased the amount of
data to 15 years worth and also required a simple inner join on 2
columns to another table for those views.

Now here is the issue. After times of inactivity or other times during
the day with enough time between my test query run I get what looks
like blocking behavior on the queries to the views (remember these all
go to the same tables). I run my 25 queries and the 11 view queries
all take about 120 seconds each to return (they all are within
milliseconds of each other like they all sat there and then were
released for processing at the same time). The rest of the queries are
fine. Now if I turn around and immediately run the 25 queries again,
they all come back in a few seconds which is the normal amount of time.
Also, if I run a query on one of views first (just one) and then run
the 25 queries they all come back in a few seconds as well.

This tells me that some caching must be involved since the times are so
different between identical queries but I would expect that one of the
queries would cache and thus take longer but the other 10 would be
fast, not all block for 2 minutes. What is more puzzling is that this
behavior didn't occur before where now the only differences are:

1) 3 times more data (but that shouldn't cause a difference from 3
seconds to 120 and all tables have been through the index wizard with a
SQL trace file to recommend indexes)
2) There is now a join between 2 tables where there wasn't before
3) The tables are replicated throughout the day.

I would appreciate any insight into this problem as 120 seconds is way
too long to wait. Thanks in Advance.


Nov 30 '05 #1
1 2102
lo***********@y ahoo.com (lo***********@ yahoo.com) writes:
This tells me that some caching must be involved since the times are so
different between identical queries but I would expect that one of the
queries would cache and thus take longer but the other 10 would be
fast, not all block for 2 minutes. What is more puzzling is that this
behavior didn't occur before where now the only differences are:

Well, if the is not in the cache but must be read from disc, it is not
the case that one process actually gets the data from disk and runs for a
long time, whereas the other gets the data out of thin air in lieu out of
a cache.

Exactly what happens, I don't know, but I don't really think that there
11 requests for each data page. Nevertheless, all physical must complete
before the queries can complete.

120 seconds sounds a wee bit, though.

One way to study the issue is to run one of the queries from Query
Analyzer when the cache is empty with SET STATISTICS IO ON and watch
physical IO.

It is also worth testing the impact of running a lesser number of the
queries, and see what happens in this case.

DBCC DROPCLEANBUFFER S can be used to flush the cache.
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
Books Online for SQL Server 2000 at
Dec 1 '05 #2

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

Similar topics

by: Thue Tuxen Sørensen | last post by:
Hi everybody ! I´m maintaining a large intranet (approx 10000 concurrent users) running on one IIS box and one DB box with sqlserver 2000. Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2 scsi disks installed on the db box. Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to be using it all.
by: David Sworder | last post by:
This message was already cross-posted to C# and ADO.NET, but I forgot to post to this "general" group... sorry about that. It just occured to me after my first post that the "general" group readers might have some thoughts on this perplexing .NET blocking issue. (see below) ===== Hi,
by: Evan Smith | last post by:
My database is suffering from poor performance of late. Reports that used to run in a reasonable time, now take a while. The explain output show that the query is fully indexed, and the statistics are up to date. Using a statement monitor I was able to determine that a particular query took 545 seconds of real time to run, yet only 19 seconds of CPU. According to my system monitoring tools, I had plenty of idle CPU cycles and free memory...
by: Andre Kelmanson | last post by:
Hi, I'm writing a proxy application for rfb protocol (vnc), but i'm not satisfied with it's performance. I'm using blocking i/o and the app just read(...) from source and the write(...) to destination. The performance diference between the client directly connected to the server and the client passing thru the proxy is very visible. Does non-blocking i/o solves my problem? Maybe the problem here is the unnecessary(?) wait in write(...)...
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate via a socket connection (no remoting, no ASP.NET). The client sends a message to the server that contains some instructions and the server responds in an asynchronous fashion. In other words, the client doesn't block while waiting for the...
by: Rene | last post by:
Hi, In my VB6 application I'm using a class/object that is using full-async ADO. I can start multiple queries, the class stores the ADODB.Recordset object in an array and waits for the QueryComplete event. This will set the result and flag 'the query is finished' in the array. In my WaitForResult() method I wait till the flag 'query is finished' is set and return to the caller. While waiting I'm calling DoEvents and delay
by: loosecannon_1 | last post by:
I get a 90-120 second blocking when send 15 or so simultaneous queries to SQL Server 2000 that query a view made up of two joined tables. After each query is blocking for the same amount of time they all return. Further identical queries of this type work in 3-4 seconds (caching?) until hours later where it happens again. If I query the tables directly (without the view) I still get the same blocking. If I remove the join (it is a simple...
by: Fabuloussites | last post by:
I'm considering deploying an application that will us an IP address locaiton database provided by Ip2location.com... http://www.ip2location.net/ip2location-dotnet-component.aspx their .net component reads data from a binary file. I'm guess i'm wondering which of the two options would be best. 1) read data from the binary files (~27 mb or so) 2) or query a sql DB with the same info.
by: Nadeem Ashraf | last post by:
Hi, We are developing a web based application "UltraLearn.com" with a mix of junior/senior Microsoft technologies. That includes Microsoft Silverlight, ASP.Net Ajax and WCF/WF. Recently, we have hit the wall with some of tested/proven technologies. The problem statement follows: We are calling a WCF Service from our site pages to track user navigation. The service in turn makes call to a gateway/server (using HttpWebRequest,...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.