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

SQL Server Query Analyzer faster than ADO.Net SQL Data Provider

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
Jul 21 '05 #1
2 2469
Perhaps QA has an open connection to the database already?

Greg

"vidya" <sa*********@hotmail.com> wrote in message
news:Om**************@tk2msftngp13.phx.gbl...
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

Jul 21 '05 #2
Just a guess, but try natively compiling the aplication first (ngen.exe).

"vidya" <sa*********@hotmail.com> wrote in message
news:Om**************@tk2msftngp13.phx.gbl...
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

Jul 21 '05 #3

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

Similar topics

3
by: David Gray | last post by:
Hello all, Having problems connecting to an Oracle 9i database from within SQL/Server 2000 using the Security/Linked Servers feature. Server1 (SQL/Server) ----------- Windows Server 2003,...
3
by: Dan Berlin | last post by:
I have two tables: T1 : Key as bigint, Data as char(20) - size: 61M records T2 : Key as bigint, Data as char(20) - size: 5M records T2 is the smaller, with 5 million records. They both have...
1
by: Russell Kahler | last post by:
I have two server defined (S1 and S2) S1 has a link defined to S2. If I open Query Analyzer and run a query referencing S2 server. My statement returns data (lets say I am using MSSQL standard...
2
by: Elvira Zeinalova | last post by:
Hei, We have 2 MS SQL SERVER 2000 installed on 2 different servers (2 separated machines). I am triing to connect them så that when one row is added to the table in the database in main server - ...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
2
by: vidya | last post by:
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...
5
by: Neil | last post by:
I am getting time-out errors when I try to perform a simple delete on a linked server. The command is: Delete From MyTable Where PKID=12345 I have tried executing this command directly from...
1
by: jeeji | last post by:
HI I am experiencing something funny here where I have two equivalent queries: If I run them through query analyzer, the first runs slower than the second, but if run through C# application, the...
7
by: alexbf | last post by:
Hello, I have a stored procedure in SQL Server 2000. When I execute it through my .NET application (OleDbCommand), I can see (in SQL Profiler) that it takes 423 ms to complete. If I run the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.