# Read-only connections

**URL:** <https://forum.inductiveautomation.com/t/read-only-connections/12459>\
**Category:** Archived Topics\
**Created:** [December 12, 2016, 9:50pm UTC](https://forum.inductiveautomation.com/t/read-only-connections/12459 "2016-12-12T21:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![driverk](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@driverk](https://forum.inductiveautomation.com/u/driverk)\
**Post date:** [December 12, 2016, 9:50pm UTC](https://forum.inductiveautomation.com/t/read-only-connections/12459/1 "2016-12-12T21:50:39Z")

</div>

Can someone from IA comment on whether functions such as system.db.runQuery mark the connection as read-only? I am thinking of the javadoc below.

[docs.oracle.com/javase/8/docs/ap … y-boolean-](http://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setReadOnly-boolean-)

My guess is no, and there are several possible reasons not to do it. The alternative is to define a read-only user in the database and specify that user for the connection credentials.

The general idea is our case is to get some performance optimization in mixed-node environments where read queries can be shared among multiple nodes, but writes must go to only one node.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 12, 2016, 10:03pm UTC](https://forum.inductiveautomation.com/t/read-only-connections/12459/2 "2016-12-12T22:03:53Z")

</div>

No, it’s not used.
