Page 1 of 1

Multiply Active Result Set (MARS)

Posted: Thu 21 Jan 2016 09:02
by drzewieckil
Hello,

I've noticed that using your driver to PostgreSQL it's possible to use MARS (ie many opened Data Readers in .net on the same connection). Using open source Npgsql driver though it's not possible.
I wonder how MARS is implemented in your driver and does it have an impact on performance?
Can I use it safetly on big data collections?

Re: Multiply Active Result Set (MARS)

Posted: Fri 22 Jan 2016 15:06
by Pinturiccio
dotConnect for PostgreSQL does not support MARS. PgSqlDataReader must be closed before using the associated PgSqlConnection.
drzewieckil wrote:I've noticed that using your driver to PostgreSQL it's possible to use MARS (ie many opened Data Readers in .net on the same connection).
You could get such a situation in case if FeachAll=True (the default value). Whole resultset is read into buffer when executing a command, and then it is read from the buffer, and it's possible that the connection is ready to use again prior to closing the reader, but these are very special cases. In general PgSqlDataReader must be closed before using the associated PgSqlConnection.

Re: Multiply Active Result Set (MARS)

Posted: Mon 25 Jan 2016 06:30
by drzewieckil
Thank you for your answer.

Do you plan to implement MARS in future versions?

Re: Multiply Active Result Set (MARS)

Posted: Mon 25 Jan 2016 12:27
by Pinturiccio
We will investigate the possibility to support MARS but this feature isn't on our to do list, and no timeframe is available.