Re: different plan based on connection

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hard to say without seeing all the code, etc. I would guess that it might
boil down to differences in the libraries you used to connect to SQL Server,
or at least differences in the settings. But again there's not enough info.
here for a conclusive answer.

"Dan Holmes" <dan.holmes@xxxxxxxxxxxxxx> wrote in message
news:ul1sHp%23AKHA.3708@xxxxxxxxxxxxxxxxxxxxxxx
I wrote a simple vb and c# app that just executed sql and filled a
datagrid. I then turned profiler on and trapped the XML plan along with
the stmt complete and batch completed events.

I noticed that when executing sql from VB via ADO2.8 that the query plan
was different when executed from SSMS and C#. the vb plan was a parallel
execution whereas the SSMS and C#plans were the same but did not use
parallelism. The sql was the same as is the DB and server they were
executing against.

Does anyone know why that would be?

dan


.



Relevant Pages

  • Re: SP runs slower than same query in Query analyzer. Why??
    ... Andrew your reply was useful but I'm quite new to sql server and I'm ... query gives me the results in 3-4 seconds. ... > Keep in mind that the server has to compile a complete execution plan ... > when compiling a plan. ...
    (microsoft.public.sqlserver.clients)
  • Re: Millions of Delete Statements
    ... You mention a cursor. ... Others have mentioned batching the commands, ... so I will throw out one that is less good (executing them ... get the whole SQL statement I don't know of another way to do it). ...
    (comp.databases.ms-sqlserver)
  • Re: SP runs slower than same query in Query analyzer. Why??
    ... Consider a stored proc defined as follows: ... In 6.5, at compile time SQL ... > when compiling a plan. ... > execution plans, but a key requirement for everything to work as expected ...
    (microsoft.public.sqlserver.clients)
  • Re: Query Statment is Fast But Stored Procedure is Slow
    ... poor plan the first time it is run. ... Consider a stored proc defined as follows: ... In 6.5, at compile time SQL ... execution plans, but a key requirement for everything to work as expected ...
    (microsoft.public.sqlserver.programming)
  • Re: Poor performance after upgrading to sql server 2005
    ... Andrew J. Kelly SQL MVP ... I've included the SQL 2005 execution plan but I do not ... <RunTimeInformation> ...
    (microsoft.public.sqlserver.setup)