# Transaction made tables vs scripted tables

**URL:** <https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025>\
**Category:** Ignition\
**Created:** [November 12, 2021, 7:55pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025 "2021-11-12T19:55:00Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [November 12, 2021, 7:55pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/1 "2021-11-12T19:55:00Z")

</div>

I am getting different results from making transaction tables using the OPC browser, and my colleague’s table that he made scripting.

In his script, he created a pydataset as a tag I believe.

have the tradeoffs been discussed much?  
Or is one decidedly better?

I think he timed them both, and the script method was faster.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 12, 2021, 8:04pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/2 "2021-11-12T20:04:17Z")

</div>

Not sure what you mean by

> [@zacharyw.larson](#):
>
> making transaction tables using the OPC browser

The OPC browser is read only

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [November 12, 2021, 8:05pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/3 "2021-11-12T20:05:29Z")

</div>

if I make a transaction group, then the group stores that data into a table on the trigger

this other method, my friend is writing as script that sets all the data into a dataset that is a tag

I guess I meant specifically when I make the transaction group, I use the opc browser to pick the tags.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 12, 2021, 8:06pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/4 "2021-11-12T20:06:22Z")

</div>

So you’re talking about comparing dataset tags vs SQL tables?

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [November 12, 2021, 8:06pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/5 "2021-11-12T20:06:36Z")

</div>

yes

I am new and wonder what the tradeoffs are

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 12, 2021, 8:13pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/6 "2021-11-12T20:13:44Z")

</div>

SQL tables are meant for storing and retrieving large amounts of data. I would always trust sql over dataset tags for critical data. You can also report on sql table data far more easily than a dataset tag data as you can use sql queries and achieve more complex criteria in less code (compared to using python). I still use dataset tags, but only for configuration of things like for example storing the steps of one sequence (50 or so rows). I could store this in a sql table as well, but you also need to consider where the data will be used. If it’s in Ignition Edge, they can’t access sql data at all. I want edge clients to be able to see sequence steps, so my only option is dataset tags. I also have a dataset tag that stores a lookup of udt type against popup window to open

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 12, 2021, 8:17pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/7 "2021-11-12T20:17:37Z")

</div>

With SQL, you are dealing with rows. If you add a row, you’re done. To add a row to a dataset, you are creating a whole new dataset. There is no differential.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [November 12, 2021, 8:18pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/8 "2021-11-12T20:18:06Z")

</div>

Thanks again guys

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 12, 2021, 8:18pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/9 "2021-11-12T20:18:15Z")

</div>

In addition to everything @nminchin said which is true, storing data into a database also allows other users who have access to that database (likely the IT department or adjacent) to also query and do with the data what they want, without fear that they would mess up anything in your Ignition application.

In the case of a dataset tag, the only way someone else could view that would be either in your client (if you’re displaying it somehow), or if they open designer (which is probably not something you want anyone who’s not an integrator to do).

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 12, 2021, 8:21pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/10 "2021-11-12T20:21:23Z")

</div>

Also, regarding speed, I don’t know how then transaction manager works, but it may send its insert query to the store and forward system for execution which would see the new row appearing only once the s+f system has processed it

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [November 12, 2021, 8:24pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/11 "2021-11-12T20:24:08Z")

</div>

I believe the time trial was like 7ms vs 15ms

but if I understand correctly the time for the dataset tag is proportional to the current size and will climb in time to execute the large the table becomes

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 12, 2021, 8:24pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/12 "2021-11-12T20:24:17Z")

</div>

One other thing I will say is that I trust Ignition’s coding more than my own, so in your scenario. I would trust the Transaction groups more than something I coded myself to do the same thing. Though if its just a INSERT query its most likely not going to throw you any crazy errors.

Also, until this thing is up and running, trying to prematurely optimize this might end up being a waste of time. Until you get real data flowing at the production rate you’d expect, it can be hard to really know where the bottlenecks are.

Edit: I would not sweat a 8 ms difference.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 12, 2021, 8:24pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/13 "2021-11-12T20:24:40Z")

</div>

The other thing you cns do of course instead of using the transaction thing is to script inserting rows into the sql table. I’ve never used the transaction manager. I never took the time to understand it 😅 and find scripting it easier and far more customisable

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 12, 2021, 8:25pm UTC](https://forum.inductiveautomation.com/t/transaction-made-tables-vs-scripted-tables/53025/14 "2021-11-12T20:25:43Z")

</div>

> [@nminchin](#):
>
> I’ve never used the transaction manager.

Whereas it's what I started with in the FactorySQL days. lol.
