Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2005, 01:44 AM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO.Net slower than SQL Server Query Analyzer

Hi,

I wrote a stored procdure in SQL Server which calculates some metrics.
This procedure always returns only one row with 11 columns of integer
values.

I ran it in SQL Server Query Analyzer thru a remote machine and it executes
the procedure in 5 to 6 seconds.
I wrote some ADO.Net SqlDataReader code and it takes 25 seconds to get the
data back from the same remote machine.
I tried SQLDataAdapter also and it takes 25 seconds.

I logged the time before the database call in the code and immediately after
the Command.ExecuteNonQuery() method.
I clearly see that it takes 25 seconds.

I also tried using Data Access Application block v2.0 from the microsoft
site. Even it takes 25 seconds.

I don't understand why Query Analyzer is so much faster than ADO.Net Sql
Data provider?
Can anyone explain this?

Thank You in advance
Vidya
 
Old January 26th, 2005, 09:49 PM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jackat_78
Default

On my side, It's really true that SQL query analyzer is much faster than the ADO.net, because the SQL Query analyzer directly executes on the backend of the SQL Server. Unlike the ADO.Net, it executes and interpret by VB.net or other front end and load the data into memory and passing to ADO.net connections to the the SQL server. Sometimes it takes longer due to some factors of the computer memory or etc.

Jimmy P. Calatrava
System/Network Admin/VB.NET Programmer
RD Group of Companies
Philippines

---***---***---
Life always begin with TRUE or False





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server with ADO.NET dounme SQL Server 2000 4 February 8th, 2005 09:19 PM
SQL Query Analyzer bmains SQL Server 2000 3 June 23rd, 2004 05:58 PM
How I Can N' Switch In My SQL Query In ADO.NET yoord ADO.NET 7 June 13th, 2004 02:39 AM
SQL Query Analyzer Save As ioates SQL Server 2000 1 May 18th, 2004 08:01 AM
xml result set truncated in sql query analyzer xologist SQL Server 2000 2 March 22nd, 2004 05:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.