Dan
Tue Feb 07 07:05:11 CST 2006
Pablo, thanks a lot for adding these comments. Your article was especially
informative.
--
Dan Guzman
SQL Server MVP
"Pablo Castro [MS]" <pablocas@online.microsoft.com> wrote in message
news:e$fR4z2KGHA.1312@TK2MSFTNGP09.phx.gbl...
> I'd like to put some clarification and to confirm some of the comments in
> the thread, and then point to some resources. I'm assuming that since
> we're in the ADO.NET newsgroup, this is about ADO.NET in particular :)
>
> - As several folks pointed out, MARS and asynchronous command execution
> are different, unrelated things (they can be used to together, but that's
> another story)
> - Asynchronous command execution works against all versions of SQL Server
> that ADO.NET can talk to (7.0 and later). You get the same functionality
> against all of them.
> - Asynchronous command execution is *not* the same as old ADO's
> asynchronous execution, and it's *not* the same as using an asynchronous
> delegate (BegingInvoke) or the thread-pool.
> - Asynchronous command execution is entirely implemented on the client
> interfaces, not in the server. It's completely unrelated to OPTION(FAST x)
> or FASTFIRSTROW
>
> A few years ago, in the first beta of ADO.NET 2.0 and early pre-release
> versions of SQL Server, there used to be something called MDAC 9.0. That
> thing does not exist any more. ADO.NET is now self-contained, so you don't
> need any external libraries in order to use asynchronous command
> execution, MARS, or any other SQL Server feature from ADO.NET.
>
> For more information about asynchronous command execution you can read:
>
http://msdn.microsoft.com/library/en-us/dnvs05/html/async2.asp
>
> --
> Pablo Castro
> Program Manager - ADO.NET Team
> Microsoft Corp.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote
> in message news:OUF5hLpKGHA.3732@TK2MSFTNGP10.phx.gbl...
>>> Synchronous is the opposite of asynchronous.
>>
>> Yes, I wrote synchronous in the sense that you implied that the new
>> "asynchronous" features of ADO.NET 2.0 are not truly asynchronous. I.e.,
>> I was wondering which parts were still synchronous.
>>
>>
>>> You still have to execute Read or Load to return the rows. As you do,
>>> your application is blocked until the last row is returned (Load
>>> method).
>>
>> Which answers my question :-). You cannot read the rows and present them
>> "as they come". I.e., the app behavior will be more like QA grid mode
>> (synchronous behavior) compared to text mode (truly asynchronous
>> behavior).
>>
>> I have a feeling that the SQL Server FAST hint is sometimes overused. The
>> developer think that he/she can gain something by using these hints:
>> "I'll present the first few rows immediately", where very few
>> applications/API/programmers actually program in that sense. And when SQL
>> Server receives a FAST hint, the overall resource utilization can be
>> significantly higher (using a non-clustered index for an ORDER BY over a
>> large set, for instance).
>> --
>> Tibor Karaszi, SQL Server MVP
>>
http://www.karaszi.com/sqlserver/default.asp
>>
http://www.solidqualitylearning.com/
>> Blog:
http://solidqualitylearning.com/blogs/tibor/
>>
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>> news:%23mUrrioKGHA.1124@TK2MSFTNGP10.phx.gbl...
>>> Synchronous is the opposite of asynchronous. It means that when you
>>> execute a synchronous operation (as most are) the application is blocked
>>> until the operation is completed. When you execute BeginExecuteReader,
>>> only the _query_ is executed asynchronously. Not a single row has been
>>> returned from the query when ADO.NET signals that the asynchronous
>>> operation is complete. You still have to execute Read or Load to return
>>> the rows. As you do, your application is blocked until the last row is
>>> returned (Load method).
>>>
>>> --
>>> ____________________________________
>>> William (Bill) Vaughn
>>> Author, Mentor, Consultant
>>> Microsoft MVP
>>> INETA Speaker
>>> www.betav.com/blog/billva
>>> www.betav.com
>>> Please reply only to the newsgroup so that others can benefit.
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> __________________________________
>>>
>>> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote
>>> in message news:eiN02bkKGHA.1192@TK2MSFTNGP11.phx.gbl...
>>>> Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly
>>>> what it is that is synchronous. Are you saying that I cannot read any
>>>> rows until all rows has been returned? I.e., a FAST hint in the SQL
>>>> query would be of no advantage, but probably lead to higher resource
>>>> utilization and slower response time (depending on the plans of
>>>> course)?
>>>>
>>>> --
>>>> Tibor Karaszi, SQL Server MVP
>>>>
http://www.karaszi.com/sqlserver/default.asp
>>>>
http://www.solidqualitylearning.com/
>>>> Blog:
http://solidqualitylearning.com/blogs/tibor/
>>>>
>>>>
>>>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>>>> news:OSG$1UcKGHA.3272@tk2msftngp13.phx.gbl...
>>>>> Good answers all.
>>>>>
>>>>> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
>>>>> ADO.NET only _executes_ the query async--the row-fetch operation is
>>>>> synchronous unless you write your own backgroundworker thread routine
>>>>> to handle it.
>>>>>
>>>>> MARS? Just leave it alone--you won't need it for 90% of the things
>>>>> needed to be done.
>>>>>
>>>>> --
>>>>> ____________________________________
>>>>> William (Bill) Vaughn
>>>>> Author, Mentor, Consultant
>>>>> Microsoft MVP
>>>>> INETA Speaker
>>>>> www.betav.com/blog/billva
>>>>> www.betav.com
>>>>> Please reply only to the newsgroup so that others can benefit.
>>>>> This posting is provided "AS IS" with no warranties, and confers no
>>>>> rights.
>>>>> __________________________________
>>>>>
>>>>> "Griff" <howling@the.moon> wrote in message
>>>>> news:%23lKiyuKKGHA.3936@TK2MSFTNGP12.phx.gbl...
>>>>>> Two questions relating to this:
>>>>>>
>>>>>> 1 - Do I require SQL Server 2005 or can this work with SQL Server
>>>>>> 2000?
>>>>>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry
>>>>>> setting says that I'm using 2.8 but I can't find where I can download
>>>>>> an update from.
>>>>>>
>>>>>> Thanks if you can help with either of these questions.
>>>>>>
>>>>>> Griff
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>
>