473,385 Members | 1,796 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,385 software developers and data experts.

Stored Procedures vs ADO vs T-Sql

Which method would give me the best performance for logging large
records into a database with over 25000 rows in SQL Server 2003?
Jul 20 '05 #1
4 3157
On 19 Sep 2003 12:45:11 -0700 in comp.databases.ms-sqlserver,
ch********@aol.com (Cheryl) wrote:
Which method would give me the best performance for logging large
records into a database with over 25000 rows in SQL Server 2003?


Depends where the data is coming from, if from outside of SQL Server
then you would need ADO.

T-SQL will have to compiled before running, this is not really that
much of an overhead.

Stored procedures are written in T-SQL and as their name suggests,
stored on the server and pre-compiled. They will run ever so slightly
faster than just chucking T-SQL at the server... mostly.

ADO OTOH is just a method of connecting to the server and executing
either of the above.

--
A)bort, R)etry, I)nfluence with large hammer.
Jul 20 '05 #2
Cheryl (ch********@aol.com) writes:
Which method would give me the best performance for logging large
records into a database with over 25000 rows in SQL Server 2003?


From slowest to fastest:

.AddNew in ADO
INSERT statement passed from ADO
Stored procedure passed as adCmdText
Stored procedure called through adCmdStoredProcedure
the BulkCopy interface in OLE DB.
Build an XML document and unpack it with OPENXML.

For a somewhat less terse, see <Xn**********************@127.0.0.1>
that I posted yesterday.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3
Trevor Best <bouncer@localhost> wrote in message news:<52********************************@4ax.com>. ..
On 19 Sep 2003 12:45:11 -0700 in comp.databases.ms-sqlserver,
ch********@aol.com (Cheryl) wrote:
Which method would give me the best performance for logging large
records into a database with over 25000 rows in SQL Server 2003?


Depends where the data is coming from, if from outside of SQL Server
then you would need ADO.

T-SQL will have to compiled before running, this is not really that
much of an overhead.

Stored procedures are written in T-SQL and as their name suggests,
stored on the server and pre-compiled. They will run ever so slightly
faster than just chucking T-SQL at the server... mostly.

ADO OTOH is just a method of connecting to the server and executing
either of the above.

What is an advantage of using ADO to log to the SQL Server opposed the
a stored procedure or and T-SQl. What part would DTS play in this
procedure?
Jul 20 '05 #4
Cheryl (ch********@aol.com) writes:
What is an advantage of using ADO to log to the SQL Server opposed the
a stored procedure or and T-SQl. What part would DTS play in this
procedure?


Your question was very terse, why Trevor had to make some guesswork
about your surroundings.

Maybe you can give some more details about your situation. Where does
the data come from? Do you get files from another site? Is the data
being generated by a program?

That sort of information is really necessary to give a good answer to
your question.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #5

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

Similar topics

2
by: M Wells | last post by:
Hi All, I'm wondering if anyone can tell me if it's possible to search for stored procedures by their contents? I tend to leave very descriptive notes in stored procedures and they're...
17
by: serge | last post by:
How can i delete all user stored procedures and all table triggers very fast in a single database? Thank you
3
by: Ben | last post by:
Dear MySQL experts, I have a website that is using MS SQL Server 2000 with ASP scripting. I want to switch over to MySQL, but I'm just sticking my toes in the water at the moment to see if it...
0
by: Tim Bolla | last post by:
I have created ~30 stored procedures that I need to have running on a database in order to use the application that I have developed. I am looking for a solution so that these stored procedures...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
24
by: Benjamin Doyle | last post by:
In Chip Irek's "A PRIMER ON USING DB2 WITH .NET" (www.15seconds.com), he states that "...ODBC doesn't support DB2 stored procedures. So if you are building an application heavily dependant on...
5
by: Rhino | last post by:
I am trying to determine the behaviour of stored procedures in DB2 V8.2.x in Windows/Unix/Linux and how I can control that behaviour. Some documentation in the manuals is confusing the issue...
2
by: bshumsky06 | last post by:
Hi, I am trying to create stored procedures in MySQL. Does anyone have a suggestion on a good IDE to use. I have been working with the MySQL Query Browser but it generates errors very often and...
0
by: vanesa | last post by:
Hi, In a client we must begin to program many stored procedures of DB2. The following doubts arise to me that I raise you to see if you can help me: 1. From a point of view of the programming:...
6
by: Arjen | last post by:
Hi, My experience with linq is that I can develop my web application very fast. On the other hand, I have read that using stored procedures are executing faster. Is it smart to use linq for a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.