SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Using Multiple Active Result Sets (MARS)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 04/03/2007 :  08:45:18  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
SQL Server 2005 has so many new features that in my opinion if you read only BOL for a year you'd find something new every day. One of those is Multiple Active Result Sets or MARS. Multiple Active Result Sets is a new SQL Server 2005 feature that, putting it simply, allows the user to run more than one SQL batch on an open connection at the same time.

Article Link.

svdsinner
Starting Member

USA
2 Posts

Posted - 04/09/2007 :  09:26:44  Show Profile  Visit svdsinner's Homepage  Click to see svdsinner's MSN Messenger address  Reply with Quote
quote:
Also the important thing to realize is that multiplexed execution DOES NOT mean parallel execution.


This doesn't jive with what I understand about MARS. Or maybe it is just worded ambiguously. I thought that named save points were disabled on MARS connections explicitly because the parallel execution through MARS does not guarantee the order with which the commands are executed.

I certainly agree that MARS doesn't mean parallel connections (Higher bandwidth) It has just one, time sliced connection.

But, my understanding was that MARS most certainly does use time-slicing to produce parallel execution of multiple batches. Am I wrong on this?

The Pragmatic TSQL Programmer
http://www.solidrockstable.com/blogs/PragmaticTSQL
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 04/09/2007 :  10:11:39  Show Profile  Visit spirit1's Homepage  Reply with Quote
yes it has a time sliced connection. but time slicing isn't equal to parallel execution.

it uses time slicing on statements i mentioned. so if for example you have 2 select statements that are MARS-ed
then both will be time sliced:
slice 1: run select 1 part 1
slice 2: run select 1 part 2
slice 3: run select 2 part 1
slice 4: run select 1 part 3
slice 5: run select 2 part 2
... etc

until both statements complete.
i haven't seen anything that would give accurate results on how the sql server prioritizes things
if both statement transactions are equal. but i'm still playing with that.
however if you have a select and insert then when the insert comes in while the select is being procesesd
it will get executed in full before select can proceed onward.

real parallel execution only comes with more than 1 processor core.

time slicing is only make belief parrallel execution.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

svdsinner
Starting Member

USA
2 Posts

Posted - 04/10/2007 :  15:21:50  Show Profile  Visit svdsinner's Homepage  Click to see svdsinner's MSN Messenger address  Reply with Quote
But (in my understanding, I could be wrong) only the connection is time-sliced, not the processing. (Although, it is true that if you only have a single CPU that the OS with time-slice it) SQL treats the multiple commands coming through MARS the same as multiple commands from different connections and processes them in parallel. (With the standard locking stuff that has always been there to prevent corruption)

Of course, the whole issue is almost moot because there are extremely few cases where, even with MARS, parallel processing would ever occur, and fewer still where it would matter one way or another.

The Pragmatic TSQL Programmer
http://www.solidrockstable.com/blogs/PragmaticTSQL
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 04/11/2007 :  03:56:40  Show Profile  Visit spirit1's Homepage  Reply with Quote
yes the processing on the server itself is what ever the server decides.
the returning result sets are time sliced.
so yes the connection is time sliced.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000