473,761 Members | 8,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Batch - Slow Response - Remote DB query

Hello.
I have a slow response with a system that I am setting up. The OS is
Win 2000 Server with SQL Server 2000. My first execution of the SQL
procedure is slow (about 40 seconds), while the second execution is
faster (approx. 3 seconds and what I expect).
Using query analyser I can leave the window up and come back ( after
say 10 minutes ) and my next response is will be slow (and faster
straight after this).

The query itself is the "TOP 10" rows from a table of a remote DB (MSDE
2000 - NT station).
This is similar to;
---------------------
DECLARE @SelectRowsFrom RemoteDB NVARCHAR(400)
SET @SelectRowsFrom RemoteDB = "SELCT a.* FROM OPENROWSET
('SQLOLEDB', 'Remote', ....) a"

EXEC sp_executesql @SelectRowsFrom RemoteDB
---------------------

The CPU usage goes high (with Task Manager), but oddly the task with
most usage is the "Idle Process".

Please help with an answer
or a good starting point to known where the resources are being used.

Regards JC.....

Oct 16 '06 #1
2 2620
Sounds like it might be copying the table to the local server to do
sorting maybe?
My first thought wouldbe that the second call was fast because the data
was in memory. Maybe the third was slow because something had purged
that data?

Try using the profiler on both machines to see what was executed on
them.

www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Oct 16 '06 #2

nigelrivett wrote:
Sounds like it might be copying the table to the local server to do
sorting maybe?
My first thought wouldbe that the second call was fast because the data
was in memory. Maybe the third was slow because something had purged
that data?

Try using the profiler on both machines to see what was executed on
them.

www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
I am sure it is not an issue with copying the data. I can continually
poll the remote DB manually and the speed is quick and it changes when
expected. The problem appears to be related to finding the path to the
remote server. This memory of where to look for the remote DB seems to
be short.

Regards JC......

Oct 18 '06 #3

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

Similar topics

9
3456
by: j askey | last post by:
I have a strange bandwidth issue that I have finally tracked down to something fairly specific if anyone has any ideas... Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI Network: DSL line with a Cisco 678 router using NAT and static port maps. Two switches between webserver and Cisco. Problem: Accessing PHP driven site via any computer except the web server is about 20 times slower. I can get fast response on the server
2
1917
by: Jon Maz | last post by:
Hi All, To allow myself to make development changes directly on a remote server *without* having to compile on my local dev machine and then upload the dll's to remote, I have created a RunBatch.aspx on the remote which calls a batch file (myBuild.bat) on the same machine, and this batch file executes the necessary command-line compiler instructions to recompile (code below). So far (fingers crossed) it seems to be working. The only...
9
8848
by: Doug at SAU | last post by:
I need to run a batch file on a remote machine from an ASP page. I dummied up a test ASP page as follows: <% Set WshShell = Server.CreateObject("Wscript.Shell") wshshell.run "c:\inetpub\wwwroot\logasp\getdr.bat > c:\tstlog.txt" %> the batch file is as follows:
3
2384
by: Pavils Jurjans | last post by:
Hello, I am experiencing very slow processing of ASP.NET pages that are served over LAN, while when running them on the server machine (ie http://localhost), there is no slowdowns. We have two desktop PCs with Windows XP Corporate ed, and one Laptop with Windows 2000 Professional. The IIS is installed on all of them. When running the ASP.NET applications from localhost, they run very smoothly. When the application is uploaded to the...
4
2460
by: Ray | last post by:
Does anyone out there have experience with using Db2 8.2 with a program called MISys (also known as ACCPAC). I am having some problems with the application running exteremly slow on workstations throughout my office. One of the more accessed tables, which only has 3000 rows, take almost 30 seconds to open through their application. MISys insists that it is a db2 tweaking problem and to check my configuration settings. When I select the...
1
9006
by: lowlyscrub | last post by:
I have an ASP.NET application that makes 12 different web service calls from a single method call. Each of the web services themselves don't do much more than run a small query (I've run the queries elsewhere and they complete virtually instantaneously) on some database and return a dataset. As it so happens, the 12 calls are split up between 4 different web services on the same server, and the web services themselves are ASP.NET apps...
0
2438
by: =?Utf-8?B?Vmlua2k=?= | last post by:
hello Everyone, I created this batch file that executes the taskKill command to kill the process on the remote server. When I call this batch file from the console applications, it runs fine and kills the process on the remote server, but when I call it from web application, it runs fine, but does not kill the process. After looking through lot of google articles, I found out that I am running under aspnet account in web applications and...
3
5128
by: pramodbura | last post by:
We have a quick query regarding SQL performance. We have SQL Server 2000 (32 Bit) and SQL Server 2005 (64 Bit) as two separate instances on a DB Server. We were analysing the execution times for the same stored procedure on both instances: 1. Through Remote Desktop of the actual DB server 2. Through Query Analyser of my local machine. The results were as follows:
2
1348
jamesd0142
by: jamesd0142 | last post by:
Hi, I have a batch file on a remote server. if i use remote desktop to connect to this server and run the batch file it runs as i would expect. However i need to run this batch file from my local machine, using its mapped network drive (example: z:\apps\batchfile.bat) When i run it from this location it does not run successfully. Is it possible to run a batch file from a remote server from my machine as if i was running it from the...
0
9345
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,...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
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,...
0
9775
tracyyun
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...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
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...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
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
3
2752
bsmnconsultancy
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.