Re: When do selects execute for multiple resultsets
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Tue, 13 Sep 2005 09:42:26 -0700
Sure. Somewhat simplified, SQL Server executes each query and stops when its
initial buffer is full (less than 10K). When your code asks for rows,
(DataReader.Read) the buffer is emptied and more rows are retrieved--as fast
as you can pull them over. As you fetch more rows with Read, more rows are
located based on the query's WHERE clause etc. When the first resultset is
complete, the server pauses again waiting for the DataReader.NextResult.
Once that returns True, the process is repeated until there are no more
resultsets.
The CommandTimeout is measured from the time you execute the query until the
time the first row is made available by SQL Server.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
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.
__________________________________
"mcerutti" <mcerutti@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8CD9FC2A-0268-42C3-95D1-28F078314224@xxxxxxxxxxxxxxxx
> Does anyone know how multiple resultset stored procedures are executed
> when
> using data readers? It appears that the sp is paused after each select
> until
> the client requests the next resultset.
>
> Also, does the command timeout apply to the intial query time or for the
> time it takes to start returning the final resultset?
.
- Prev by Date: Re: Restricted Users, Shared Database Location
- Next by Date: Re: SqlConnection and pooling
- Previous by thread: Re: Restricted Users, Shared Database Location
- Next by thread: Re: When do selects execute for multiple resultsets
- Index(es):
Relevant Pages
|