Query performance




Is anyone able to explain why I'm getting very different performance as
reported by SQL Profiler for the same query when executed from 1) ADO.NET
and 2) SQL Management Studio.

I'm accessing SQL 2000 from a web service using .NET2 and Enterprise
Library.
Two particular queries have the following figures reported in Profiler
Application Name = .Net SqlClient Data Provider
1) Reads = 452, Duration = 203
2) Reads = 611931, Duration = 1636

If I copy the sql for these queries from the profiler and execute it in SQL
Management Studio, then profiler reports
Application Name = SQL Server Management Studio
1) Reads = 1238, Duration = 16
2) Reads = 704, Duration = 186

Which is a major improvement even though SQL profiler is reporting exactly
the same query.

Any idea what's causing this?

Regards
Phil Lee






.



Relevant Pages

  • Re: MultiThreading against a Procedure
    ... Then someone needs to tell the Sql Profiler team that the application does ... I DID run profiler against the process to see what was happening. ... You should not have to rebuild or dispose of the Command objects between ... I can't change the procedure to just execute from '1/1/2001' to ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Profiler
    ... > ich verwende SQL Server 2000. ... > die mir mit SET STATISTICS ON; ... > Ich habe im SQL Profiler unter "Leistung" Execution Plan, ...
    (microsoft.public.de.sqlserver)
  • Re: ADO.NET query execution much slower than SQL Management Studio
    ... Stats being compiled on SQL Server ... If you are dynamically adding statements in a sproc, ... compare this to the profiler command (meaning what is actually run in the ... Duration: 440 ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SSAS2005 and ADOMD : update cube problem
    ... The Profiler on AS shows a '14 - CommitTransaction' event with following ... The Profiler on SQL shows different Insert events into the WriteBack table ... >> Exit Sub ...
    (microsoft.public.sqlserver.olap)
  • Re: schedueling proflier
    ... An understanding of the SQL Profiler architecture will help you understand ... SQL Profiler uses a client / server architecture. ... that attaches to a server component called SQL Trace to perform it's work. ...
    (microsoft.public.sqlserver.server)