Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disadvantages of using MARS (multiple active result sets) [duplicate]

Possible Duplicate:
Disadvantages of MARS (Multiple Active Result Sets)?

I am developing an application such that i have to use multiple DataReaders at the same time. When i say Multiple datareaders i mean MULTIPLE DATAREADERS... there would be a few required at the same time.(something around 10-50 or more)

So one scenario that i came across was to use different connection strings.. but implementing that i feel awkward!!!

Another method is to use MARS which i found it was pretty decent. but my doubt is that do i need to consider or take any precautions when i implement it or is something vicious waiting for me to happen :-)

from my so called research what i was able to find was that by using MARS the server produces data fast, so the client app must receive the data at the same speed it comes in. else the data storage buffer will be filled leading to the processing to stop.. and will be enabled only when the buffer gets empty..

i got lost somewhere around here....

Also i am using only Select statements only for this reqiurement..

so my question is that are there any disadvantages using them?? how much of of data can be stored in the server data buffer such that the processing wouldn't stop??

like image 582
Manek Avatar asked Sep 05 '11 12:09

Manek


1 Answers

I suggest you use multiple connections, if it's really necessary to read from 100 datasets at once. I can't see why you'd need to have multiple active datareaders on a single connection.

It's more likely the query or task you are trying to achieve can be done without needing to do this large parallel operation, however. If you can be more specific with some details perhaps we can work out a good few alternative suggestions.

like image 55
Kieren Johnstone Avatar answered Oct 23 '22 07:10

Kieren Johnstone