# Tag historian Vs transaction groups when storing data for OEE system

**URL:** <https://forum.inductiveautomation.com/t/tag-historian-vs-transaction-groups-when-storing-data-for-oee-system/94445>\
**Category:** General Discussion\
**Tags:** perspective, ignition81, database\
**Created:** [August 9, 2024, 7:31pm UTC](https://forum.inductiveautomation.com/t/tag-historian-vs-transaction-groups-when-storing-data-for-oee-system/94445 "2024-08-09T19:31:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 11, 2024, 1:23pm UTC](https://forum.inductiveautomation.com/t/tag-historian-vs-transaction-groups-when-storing-data-for-oee-system/94445/4 "2024-08-11T13:23:29Z")

</div>

> [@KeepItCurrent](#):
>
> read further

Start here:

> [@Tag Change Scripts stop working](https://forum.inductiveautomation.com/t/tag-change-scripts-stop-working/84819):
>
> Every once in a while, we have a situation where basically all of our tag change scripts stop processing. I finally saw this error in the Console of the designer Diagnostics. It's almost as if the Basic Execution Engine has run out of threads. WARN Common.BasicExecutionEngine - Execution rejected... running in calling thread [AWT-EventQueue-0] immediately. [com.inductiveautomation.ignition.designer.tags.tree.TagTreeModelImpl$BatchOp$$Lambda$949/0x0000016597b1a668@d72dc75] Any ideas where I can…

For a detailed discussion of techniques for the last bit of advice in that topic, see this:

> [@Java concurrent queue for tag change scripts](https://forum.inductiveautomation.com/t/java-concurrent-queue-for-tag-change-scripts/82044):
>
> Continuing the discussion from [[SOLVED] Are tag Value Changed scripts running asynchronously?](https://forum.inductiveautomation.com/t/solved-are-tag-value-changed-scripts-running-asynchronously/68704/5): We've got code in our standard library that I need to log a value change on a tag and then associate various data points with that value change. The value is located in a UDT, and because this is part of our "standard" library we use for our customers, the number of tags is variable and quite possibly numerous so having a gateway tag event script isn't feasible for this solution. I was reading up on …

> [@KeepItCurrent](#):
>
> perhaps run a duration calculation within the script

I recommend you **not** do this. Just store the timestamp, event value, and some kind of process/machine/component ID with S&F.

Databases are really good at delivering the actual durations after the fact using `LEAD()` or `LAG()`, without having to do anything special to account for system start/stop, scripting restarts, and/or tag restarts.

---

_[View the full topic](https://forum.inductiveautomation.com/t/tag-historian-vs-transaction-groups-when-storing-data-for-oee-system/94445)._
