473,699 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Slow performance in SQL2005

Hi,

We have shifted one of our data processing to a new instance of SQL
2005. For this a new DB was created in SQL2005 and it is not an
upgrade of SQL200 DB.

The data processing application is a VB6 application that runs a batch
process to insert about
4.5 million records everyday in this SQL 2005 database. I am using
ADO
(ver 2.6) Connection object to execute T-SQL insert statements to
insert the 4.5 mill. records.

This same application used to insert the data in the SQL 2000
database
and used to take about 2.5 hours to do so. After moving it to SQL
2005 the performance has really detriorated and it now takes more
than
6 hours.

Is there any configuration change that I need to do in SQL 2005?
Please help.

Note: There is also an instance of SQL 2000 running in the same
server.

TIA,
Tawfiq
Feb 19 '08 #1
3 2971
On Mon, 18 Feb 2008 19:14:11 -0800 (PST), Tawfiq
<ta************ **@gmail.comwro te:

I get the impression you have VB6 code that does the equivalent of:
for i = 1 to 4.5 million
insert one record
next

Isn't there a better way?

A quick-and-dirty fix may be to continue to insert these records in
your SQL2000 instance, and then bulk-insert them into the new db. But
more than likely you can use SSIS to more efficiently import your
data.

-Tom.

>Hi,

We have shifted one of our data processing to a new instance of SQL
2005. For this a new DB was created in SQL2005 and it is not an
upgrade of SQL200 DB.

The data processing application is a VB6 application that runs a batch
process to insert about
4.5 million records everyday in this SQL 2005 database. I am using
ADO
(ver 2.6) Connection object to execute T-SQL insert statements to
insert the 4.5 mill. records.

This same application used to insert the data in the SQL 2000
database
and used to take about 2.5 hours to do so. After moving it to SQL
2005 the performance has really detriorated and it now takes more
than
6 hours.

Is there any configuration change that I need to do in SQL 2005?
Please help.

Note: There is also an instance of SQL 2000 running in the same
server.

TIA,
Tawfiq
Feb 19 '08 #2
The application reads data from binary files and then inserts it into
the db.

I can improve perfomance by first writing the data first into text
files and then doing bulk insert. But why is there such a big
differnece in performce between SQL2000 vs SQL2005?

I guess some kind of configuration change is needed or maybe even I
have to rewrite the code in ADO.NET.

Anyone got any clue for such a drastic reduction in performance?

On Feb 19, 10:31*am, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
On Mon, 18 Feb 2008 19:14:11 -0800 (PST), Tawfiq

<tawfiq.choudh. ..@gmail.comwro te:

I get the impression you have VB6 code that does the equivalent of:
for i = 1 to 4.5 million
* insert one record
next

Isn't there a better way?

A quick-and-dirty fix may be to continue to insert these records in
your SQL2000 instance, and then bulk-insert them into the new db. But
more than likely you can use SSIS to more efficiently import your
data.

-Tom.
Hi,
We have shifted one of our data processing to a new instance of SQL
2005. For this a new DB was created in SQL2005 and it is not an
upgrade of SQL200 DB.
The data processing application is a VB6 application that runs a batch
process to insert about
4.5 million records everyday in this SQL 2005 database. I am using
ADO
(ver 2.6) Connection object to execute T-SQL insert statements to
insert the 4.5 mill. records.
This same application used to insert the data in the SQL 2000
database
and used to take about 2.5 hours to do so. After moving it to SQL
2005 the performance has really detriorated and it now takes more
than
6 hours.
Is there any configuration change that I need to do in SQL 2005?
Please help.
Note: There is also an instance of SQL 2000 running in the same
server.
TIA,
Tawfiq- Hide quoted text -

- Show quoted text -
Feb 19 '08 #3
Tawfiq (ta************ **@gmail.com) writes:
The application reads data from binary files and then inserts it into
the db.

I can improve perfomance by first writing the data first into text
files and then doing bulk insert. But why is there such a big
differnece in performce between SQL2000 vs SQL2005?
Without further knowledge of your situation, it's hard to tell. But
if your code looks like Tom suspected, you loop and insert one row
at a time, it could be as simple as a network issue.

If there triggers on the table, they could have a role in it as well.

In any case, 2½ hours to load 4½ rows is overly long in my opinion.
Using bulk load seems like an excellent idea. Just make sure that
you run the bulk load with constraints in force.
--
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
Feb 19 '08 #4

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

Similar topics

9
2382
by: Neil | last post by:
I've been discussing here a SQL 7 view which scrolls slowly when linked to an Access 2000 MDB. After trying various things, I've distilled it down to the following: when the linked view has a virtual primary key, it is slow; when there is no virtual primary key, it scrolls quickly. Looking at Profiler, I see that when there is no virtual primary key, Access sends a simple select command to SQL Server. However, when there is a virtual...
3
4616
by: jdipalmajr | last post by:
I am using a strongly typed dataset with a design time schema. I load data into the dataset tables from xml. The problem I am having is after the XML load. The first time I Add a row to a table I get very slow performance (20-30 second delay). The add to table works but I get slow performance. Any record adds or deletes after this first add are fast. It does not seem to matter which table the record add occurs. I get slow...
2
1799
by: ad | last post by:
The user of my asp.net program use Sql2005 or Sql2005 express as database, both are possible. I have try both version of data base, I found: If I use Sql2005 express, the Data Source in connection string will be ..\SQLEXPRESS, like: Data Source=.\SQLEXPRESS;Initial Catalog=myDB;Integrated Security=True But I use Sql2005 , the Data Source in connection string can be use (local), like:
3
2088
by: Mario Soto | last post by:
Hi. i hava a postresql 7.4.2 in a production server. tha machine is a Pentium IV 2,6 GHZ AND 1 GB IN RAM with lINUX RH 9.0. The postresql.conf say: #--------------------------------------------------------------------------- # RESOURCE USAGE (except WAL) #---------------------------------------------------------------------------
5
3904
by: Mike | last post by:
I'm having trouble accessing SQL2005 Standard Edition as a second instance of SQL Server where the first instance is SQL 2000 Enterprise Edition. I installed SQL 2005 as a named instance "SQL2005". The server is running Windows 2000 SP4 ON A 32-Bit machine. When I look in Services I see the SQL Server (SQL2005), SQL Server Agent (SQL2005) services there. I went into SQL Server Configuration manager and disabled the named pipes protocol...
1
4903
by: ianwr | last post by:
Hi, I wondered in anyone can help with the following problem that i'm experiencing, i'll try to provide as much info as possible and any suggestions would be appreciated. I have just started at an organsiation and there seems to be slow performance maybe on the san on a 64bit itanium dual core machine. 4 CPUs are being showed to sql server, it also has 16gb of RAM. I'll start with the configuration of the SAN.
0
1537
by: ianwr | last post by:
Hi, I was wondering if anyone could shed any light on performance problems we are having with sql 2005. We have 3 boxes which are all 64bit itanium boxes (4 CPU) connected to a 145 spindle SAN using a 2gb FC card. All 3 servers also have identical builds of windows 2003 sp1. The performance on the 2005 boxes has always seemed to be worse than the 2000 box for some reason. to checkout the san performance i ran sqlio and when the box is...
2
1539
by: Jim | last post by:
We have an installed site with two SQL2005 servers (workgroup, SP2). At the publisher we recently (yesterday) bulk inserted about 2million lines into a table from a third server that's going to be part of the replicating group. However, since importing these records (using 'Import Data' to get the data in and then running a no-change update to make replication aware of them) the performance has become dreadful. The hard-drive is swamped...
3
2890
by: Michael Schöller | last post by:
Hello, First of all english is not my natural language so please fogive me some bad mistakes in gramatic and use of some vocables :). I have a great problem here. Well I will not use it anymore but I want to know why it is as it is ^^. I tried with .NET3.0 but I think it will be the same with 2.0 and 3.5. MSDTC is configured and working.
0
9185
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
9050
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...
0
7773
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
6540
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
5879
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
4389
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
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3069
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
2359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.