473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 2953
On Mon, 18 Feb 2008 19:14:11 -0800 (PST), Tawfiq
<ta**************@gmail.comwrote:

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.comwrote:

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****@sommarskog.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
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...
3
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...
2
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...
3
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: ...
5
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...
1
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...
0
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...
2
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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,...

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.