Re: Query execution takes different times from different clients

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks Rick,

I've tried the profiler to make sure that my call was making it was far as
the SQL Server and I can see the query being started. However, after my
timeout period has elapsed, it just shows up in the profiler with the number
of reads etc and also showing the query time as being just more than the
timeout period. Initially I was wondering if some kind of lock was
preventing the query from finishing, however, I'm afraid I don't have access
to see that kind of information on my SQL Server, and it seemed unlikely if
other types of client were able to run the query (SQL Server management
studio)

Andrew

"Rick Byham, (MSFT)" <rickbyh@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C47DC58D-8643-44AE-9397-8A7DD092F510@xxxxxxxxxxxxxxxx
Try turning on SQL Server Profiler and see if SQL Server is really
receiving the same query from both sources. You can also check the query
execution command to double check the performance.
--
Rick Byham (MSFT)
This posting is provided "AS IS" with no warranties, and confers no
rights.

"Andrew Brook" <ykoorb@xxxxxxxxxxx> wrote in message
news:Ou7KiNcNIHA.4832@xxxxxxxxxxxxxxxxxxxxxxx
Hi everyone,

first of all, i hope this is the correct newsgroup for this question :)

I've hit a scenario where I'm execuing a view from inside some .NET code.
I've set a timeout of 10 minutes, although this should be more than
enough. However, the query times out. When i connect to the database
using SQL Server Management Studio (full version) and execute the same
view it takes 4 seconds to return the 84 rows to me that i'm expecting...
Now, i've never experienced this kind of issue before so i've no idea
what could be causing it. Some other queries are run before it and they
finish fine (although a little slower than i would expect perhaps).I've
also used MS Access to try and run the same view and I get the same
problem as from code.

Could there be any client settings that could cause this kind of
difference?

I'd appreciate anyones thoughts on this,
Thanks,
Andrew




.



Relevant Pages

  • Re: CONTAINS performance
    ... That said, and with the query plan, I can start to give you more ... relational join in the context of the free-text optimization, ... SQL Server tables. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Very slow query
    ... with lots if information in Books Online, Books, Courses, the Net etc. ... While testing the query in QA, use the "Show Estimated Query Plan" feature. ... This is what I suggest you also pick up using Profiler. ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Indexing Service, Openquery and sp_executesql
    ... SQL Server version and sp are you running? ... > data from the indexing service catalog when pasted into ... > query analyzer, but failed when put against sp_executesql ... I would choose Microsoft Indexing ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Problem using Access or Query Designer to run queries in SQL Serve
    ... >or Query Designer within Enterprise Manager, it works and I get data back. ... >ODBC Call Failed [ODBC SQL Server Driver] Timeout Expirederror in Access ... >[ODBC SQL Server Driver] Timeout Expired ...
    (microsoft.public.sqlserver.odbc)
  • Re: Query execution takes different times from different clients
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... I've tried the profiler to make sure that my call was making it was far as the SQL Server and I can see the query being started. ... However, after my timeout period has elapsed, it just shows up in the profiler with the number of reads etc and also showing the query time as being just more than the timeout period. ...
    (microsoft.public.sqlserver.connect)