473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Does MARS use multiple connections behind the scenes?

Hi all,

Quick question. I would like to use MARS to avoid lots of additional
connections being opened in a certain area of code that I have (a deep
load style scenario)

As I understand it, it allows you to have several open data readers on
the one connection. Seems pretty straight forward really.

The thing that puzzles me is that in most of the documents I've read
about it, it states that there is no performance advantage to using it.
I don't mind that, but its does puzzle me a bit.

How can there be no performance advantage to NOT opening and disposing
potentially scores of additional connections? I know we have to factor
in connection pooling, but even still, there must be some overhead to
the alternative of creating and breaking all those extra SQLConnection
objects.

Then I got to thinking, what if its just a sort of abstraction layer -
where it is actually opening more connections behing the scenes so the
programmer doesnt need to worry about it.

I'm next to certain that that wont be the case, but could someone
explain to me why MARS isn't much more resource efficient?

Many thanks to anyone who can advise

Kindest Regards

Simon
Feb 23 '07 #1
1 1320
"Simon Harvey" <no******@hotmail.comwrote in message
news:e$**************@TK2MSFTNGP04.phx.gbl...
Hi all,

Quick question. I would like to use MARS to avoid lots of additional connections being
opened in a certain area of code that I have (a deep load style scenario)

As I understand it, it allows you to have several open data readers on the one connection.
Seems pretty straight forward really.

The thing that puzzles me is that in most of the documents I've read about it, it states
that there is no performance advantage to using it. I don't mind that, but its does puzzle
me a bit.

How can there be no performance advantage to NOT opening and disposing potentially scores
of additional connections? I know we have to factor in connection pooling, but even still,
there must be some overhead to the alternative of creating and breaking all those extra
SQLConnection objects.

Then I got to thinking, what if its just a sort of abstraction layer - where it is
actually opening more connections behing the scenes so the programmer doesnt need to worry
about it.

I'm next to certain that that wont be the case, but could someone explain to me why MARS
isn't much more resource efficient?

Many thanks to anyone who can advise

Kindest Regards

Simon
Did you read this:
http://msdn2.microsoft.com/en-us/library/ms345109.aspx
and
http://blogs.msdn.com/sqlnativeclien...27/774290.aspx
Willy.

Feb 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Schmitt | last post by:
Hello. What is the usual way for running functions in parallel on a multiple-processor machine. Actually I want to run a single computationally expensive function with different parameter sets....
13
by: Peter James | last post by:
Access 97 If I select New on the Query tab of the db window, and go staight to sql view and type in the following for example: INSERT INTO tblMyTable ( dtDate, txtAny) VALUES (#2003-09-03#,...
2
by: Larry Foulkrod | last post by:
I would like to learn what physically happens behind the scenes when I add references to a project and then build an assembly. If the reference were part of the mscorlib would the action taken by...
2
by: Joe via DotNetMonster.com | last post by:
Hi, When I bring up a page, 6 connections are created. Is this too much? What I have is a header in a usercontrol that uses a class function. Then this class function is bound to two repeater...
1
by: mplutodh1 | last post by:
This may seem like an odd thing to do, but is there a way to blindly post to a form. By that I mean, sending data (First_Name=John) without actually having the browser go to that page? I am...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
13
by: PRP | last post by:
Hi, Our DBA has complained about the large number of connections from the aspnet_wp process. We have multiple web applications deployed in different virtual directories. I read that the way...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
6
by: Andy Fish | last post by:
Hi, From what I can gather, under Asp.Net 2.0, it is safe to put data and config files underneath the app_data in the web root and they will not be served directly to the browser from a URL. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.