473,800 Members | 2,613 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL server - script execution time

Hello All.

We have tested following SQL script from query analyzer:
-- Script begin
DECLARE @I int;
SET @I = 1;
WHILE @I < 10000000 BEGIN
SET @I = @I + 1;
END
-- Script end

The script was tested on the folowing PCs with following results:
PC 1:
Pentium 4:
CPU: 1.6 Mhz
RAM: 256 Mb
HDD: 80 Gb (IDE)
OS: Windows Advanced Server SP4
SQL: Developer Edition SP4

Result: Script execution time - 0:54

PC 2:
IBM X445, 4 XEON 3.0 Ghz, 4 Mb L3 Cache
RAM: 8 Gb
RAID 5 with (SCSI) 15k disks
OS: Windows 2000 Advanced server SP4
SQL: Enterprise Edition SP 4 + Fix

Result: Script execution time - 2:19

PC 3:
DELL Power edge 1600, 2 XEON 2.40 Ghz,
RAM: 1 Gb
RAID 1 with (SCSI) 10k disks
OS: Windows 2003 Enterprise Edition SP1
SQL: Enterprise Edition SP 4 + Fix

Result: Script execution time - 1:16

NOTE 1:
All PCs have latest hardware updates

NOTE 2:
PC 1 - is local pc, with no external connections
PC 2 - is server with some number of other, external connections;
PC 3 - is server with a few external connections;

I have following question: Is the above mentioned execution time is
normal for such script ?
Also it would be very nice of You to run the script on Your SQL servers
and inform me about execution time results

Thank You beforehand

Nov 23 '05 #1
3 47834
Am 22 Nov 2005 07:57:33 -0800 schrieb ia****@gmail.co m:
DECLARE @I int;
SET @I = 1;
WHILE @I < 10000000 BEGIN
SET @I = @I + 1;
END


In the QueryAnalizer on my cheap A64/3000+ it needs 23 seconds to finish.

bye,
Helmut
Nov 23 '05 #2
(ia****@gmail.c om) writes:
Hello All.

We have tested following SQL script from query analyzer:
-- Script begin
DECLARE @I int;
SET @I = 1;
WHILE @I < 10000000 BEGIN
SET @I = @I + 1;
END
-- Script end
...
I have following question: Is the above mentioned execution time is
normal for such script ?
Also it would be very nice of You to run the script on Your SQL servers
and inform me about execution time results


On my machine it ran for 11 minutes and 15 seconds on SQL 2000 and 15
seconds on SQL 2005.

When I put it into a stored procedure and had SET NOCOUNT ON, it ran for
19 seconds on SQL 2000.

I ran into this some time ago, and first I thought it was an issue with
SP4, but that was a false alert. I think I came to the conclusion that
parallelism was part of the plot. That is, this sort of script typically
runs slower on a multi-CPU machine. (Including hyper-threaded CPU:s).

I also found that with SET NOCOUNT ON *and* the loop in a stored
procedure, that I did not get the absymal performance.


--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 23 '05 #3
1 x XP2000+ 512MB 27 seconds 100% CPU usage.
2 x MP2000+ 1GB - gave up after 6 minutes, 0% CPU usage.

Nov 28 '05 #4

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

Similar topics

2
4254
by: 11abacus | last post by:
Hi all, I wonder if this is possible: I have a script that does things that take time. In the first part of the script it does data checking and other verifications, then comes the long part. I wish to be able to send the result of the first part to the client, disconnect the HTTP (so the client can do whatever they want), the script should then continue with the rest of the time consuming tasks, at the end of execution (or if an error...
10
5431
by: Doug | last post by:
I have a script that does a huge database update, which takes a long time. However, the host I am running on (and I suspect most hosts) are running in "safe mode." This means I cannot change the maximum execution time of scripts. So, the script stops right in the middle of doing the update. On top of that, I am trying to make code that I can distribute to others. As of now, the only way that this script can be run is with sys admin...
13
2035
by: Fortepianissimo | last post by:
Here is the situation: I want my server started up upon connection. When the first connection comes in, the server is not running. The client realizes the fact, and then starts up the server and tries to connect again. This of course all happens on the same machine (local connection only). The connections can come in as fast as 30+/sec, so the server is threaded (using SocketServer.ThreadingTCPServer). Further, the server initialization...
3
1801
by: #pragma once | last post by:
That's all we are expecting from programs written in the managed code; Though a MVP advised not to say that, because after JIT compilation the code runs in the native! Funny, isn't? That means scripting languages run in the Host code and never in the native? That means scripting languages are poorer than .NET in speed just because they are hosted by an interpreter? What about .Net run time libraries? Can any one tell me the differences?...
4
6597
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were not able to pinpoint where the issue is. When the program hangs and when force the DB2...
17
5105
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the Windows XP IIS back to ASP.NET 1.1 then I get the Configuration Error (which is understandable because I'm trying to run an ASP.NET 2 site with 1.1 framework). I can however view other ASP.NET 1.1 sites on my local Windows XP machine. It's only the...
3
3378
by: mike.biang | last post by:
I am using the XMLHTTP object to request a page from within another ASP page. For my scenario, the two pages should operate in the same session. However, when I request the second page, a new session is created. This makes sense since it is coming from a different client (the XMLHTTP object as opposed to my browser). I've tried to pass the ASPSESSIONID cookie along with the XMLHTTP post, but every time I pass the valid cookie, the...
0
3207
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to the destination table(DB2). I get the following error when the package is executed: The execution of the following DTS Package succeeded: Package Name: PEX2-CopyQualDatatoDB2-UAT Package Description: (null) Package ID:...
39
5876
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
0
9691
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, 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...
0
10507
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...
0
10279
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
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
9092
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...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
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...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
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 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.