473,657 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Slow Insert in SQL Server

Hi,

It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec
on an other SQL Server. The slower run on windows 2000 terminal server
and the faster on windows 2000. The slower The slower have 2 Go of
ram, the faster 512 Mo!!!

How to diagnostic what's going wrong on the slower server? I can't
change the application who do the insertions.

Aug 16 '06 #1
4 13661
Volks wrote:
Hi,

It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec
on an other SQL Server. The slower run on windows 2000 terminal server
and the faster on windows 2000. The slower The slower have 2 Go of
ram, the faster 512 Mo!!!

How to diagnostic what's going wrong on the slower server? I can't
change the application who do the insertions.
That is amazingly slow. Using a different commercial database product,
on my slightly anemic IBM ThinkPad (2GB RAM) I just id 40,000 inserts
in 0.14sec.
--
Daniel A. Morgan
University of Washington
da******@x.wash ington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Aug 16 '06 #2
Compare the hard drive configurations. SQL Server is, after all, a
database system, and disk performance is overwhemlingly important.
More important than CPU or memory for a single load process. Factors
that could slow such a process down include logs not isolated on their
own drives and RAID 5, always slow on writes. Of course combining
those two could be particularly bad.

Next, where is the data coming from? Over the network? From another
hard drive on the same server? From the same hard drive as the
database files? Is the location of the data the same for both
servers?

Roy Harvey
Beacon Falls, CT

On 16 Aug 2006 12:36:04 -0700, "Volks" <pa************ @isac-inc.com>
wrote:
>Hi,

It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec
on an other SQL Server. The slower run on windows 2000 terminal server
and the faster on windows 2000. The slower The slower have 2 Go of
ram, the faster 512 Mo!!!

How to diagnostic what's going wrong on the slower server? I can't
change the application who do the insertions.
Aug 16 '06 #3
1.Run Processor -% Processor Time
SQLServer:SQL Statistics -Batch Requests/sec
over the period of the INSERTS

2.Are these INSERTS coming from an app over a network?


----
Jack Vamvas
_______________ _______________ _____
Receive free SQL tips - www.ciquery.com/sqlserver.htm
_______________ _______________ _____
"Volks" <pa************ @isac-inc.comwrote in message news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
Hi,

It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec
on an other SQL Server. The slower run on windows 2000 terminal server
and the faster on windows 2000. The slower The slower have 2 Go of
ram, the faster 512 Mo!!!

How to diagnostic what's going wrong on the slower server? I can't
change the application who do the insertions.
Aug 17 '06 #4
It takes 4 minutes to insert 40 000 records on a SQL Server

This performance is exactly what I would expect when each insert is done in
an individual transaction and there is no write caching. A physical
transaction log write is required during COMMIT to guarantee that data are
permanently persisted and a disk can typically sustain only 150-200 I/Os per
second.

Server grade hardware usually has write-caching that greatly improves write
performance while ensuring persistence (e.g. controller cache battery
backup). However, you can probably improve performance greatly with your
current configuration by performing the inserts in a single transaction.
This ought allow you to achieve the kind of performance Daniel alluded do.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Volks" <pa************ @isac-inc.comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
Hi,

It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec
on an other SQL Server. The slower run on windows 2000 terminal server
and the faster on windows 2000. The slower The slower have 2 Go of
ram, the faster 512 Mo!!!

How to diagnostic what's going wrong on the slower server? I can't
change the application who do the insertions.

Aug 17 '06 #5

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

Similar topics

16
21306
by: mamo74 | last post by:
Hello. I am administering a SQL Server (Enterprise Edition on Windows 2003) from some month and can't understand what is going on in the latest week (when the db grow a lot). The DB is around 250G, and has one table with 1 billion rows. It is performing in a decent way, but can't understand why a particolar table has strong performance problem.
4
2134
by: Bri | last post by:
Hi, First let me explain the process I have going on, then I'll address the problems I'm having: 1) Insert records in a temp table using a query 2) Using a query that joins the temp table with TableA Insert records into TableB 3) Delete records from temp Table 4) Table specs; temp Table - 4 fields, 3 indexes, gets 100-4500 records inserted
1
1291
by: Noman | last post by:
i am developing a system using VB 6 and Ms Access 2000. overall the system is working fine but at few instances the program get stuck for few minutes like 2 to 3 minutes i.e it is very slow. the accasions where it gets slow exists when number of records exceeeds 10,000 records. Main Ocasion where program gets slow in a table there is a field number,lenofnum,sale1,sale2
29
2113
by: Geoff Jones | last post by:
Hi All I hope you'll forgive me for posting this here (I've also posted to ado site but with no response so far) as I'm urgently after a solution. Can anybody help me? I'm updating a table on a database i.e. I've modified the table in a DataSet and I want to update it to the SQL database which the table originally came from. I'm using a data adaptor and the update command and it works BUT it is soooooooooo slow!!! Can anybody tell me...
20
6086
by: John Bailo | last post by:
I have a c# program that loops through a table on a DB2 database. On each iteration it assigns data to values in the SqlParameter collection. The command text is an INSERT statement to a Sql Server database, run with an .ExecuteQuery I enclosed the loop in a SqlTransaction and commit it at the end. I timed the program and it inserts about 70 records a second...which I think is sort of slow...so I set up some Debug.WriteLines to...
9
8666
by: dan | last post by:
within a loop i am building a sql insert statement to run against my (programatically created) mdb. it works but it seems unreasonably SLOW! Sorry, dont have the code here but the jist is very standard (I think!); e.g: # get connection loop
21
4680
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement (16 fields) takes less than 30secs, but because of db-bloat, I moved the local table to a 2nd MDB and per postings, this 2nd MDB is copied into a folder and linked as a 'temp' MDB every time I run my reporting mdb
7
3570
by: eselk | last post by:
I'm doing some speed tests. I created a brand-new table, with just one "Long Integer" field. I'm testing adding 1000 records. If I use the "Export" feature in Access, it takes only a few seconds to export the 1000 records to a new table on the server. If I use my code below, it takes 100 secods (10 records per second). Can someone help me speed up my code? --- code --- Dim con As New ADODB.Connection
7
4720
by: Don Li | last post by:
Hi, Env is ms sql server 2000. ddl: create table srchPool(tid int primary key, taid int, s tynyint, uid tynyint); -- and sql server automatically creates a clustered index for the pk dml:
0
8324
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
8740
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
8513
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
8617
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...
1
6176
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
5642
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
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
2
1733
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.