# Query tag threading - Shared or dedicated?

**URL:** <https://forum.inductiveautomation.com/t/query-tag-threading-shared-or-dedicated/84311>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 16, 2024, 9:55am UTC](https://forum.inductiveautomation.com/t/query-tag-threading-shared-or-dedicated/84311 "2024-01-16T09:55:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Goethler](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@Benjamin\_Goethler](https://forum.inductiveautomation.com/u/Benjamin_Goethler)\
**Post date:** [January 16, 2024, 9:55am UTC](https://forum.inductiveautomation.com/t/query-tag-threading-shared-or-dedicated/84311/1 "2024-01-16T09:55:41Z")

</div>

Hi all,

I am currently trying to use Query tags for pulling my data out of databases.  
The tag itself is pulling data out based on some last row timestamps, and whenever there is a change in the dataset (the output from the SQL query), then it will push this data into a JSON format which will be sent to another tag.

I could not find any information on how the threading is done in the tag browser for these Query tags. Are they running with a shared or dedicated threading?  
The old way I had of running these SQL queries, were inside the Gateway event timer, and then I had a project library function which would do the conversion from SQL output to the desired JSON payload. For this old way, I could choose to have either a shared and dedicated threading on the gateway event timer scripts, but I am not able to see such an option when I create the query tags.

Thank you in advance, and please let me know if I need to post a more elaborate explanation to this topic, or if I need to add any pictures regarding my issue.

Best regards,  
Benjamin

---

<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:** [January 16, 2024, 1:47pm UTC](https://forum.inductiveautomation.com/t/query-tag-threading-shared-or-dedicated/84311/2 "2024-01-16T13:47:02Z")

</div>

There is a shared thread pool for query tags (and expression tags), similar to but separate from the pool for tag event scripts (IIRC). Why did you abandon the robust way of using a timer event?

---

<div class="post-metadata">

**Author:** ![Benjamin\_Goethler](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@Benjamin\_Goethler](https://forum.inductiveautomation.com/u/Benjamin_Goethler)\
**Post date:** [January 16, 2024, 2:01pm UTC](https://forum.inductiveautomation.com/t/query-tag-threading-shared-or-dedicated/84311/3 "2024-01-16T14:01:47Z")

</div>

Thank you for you answer, Phil Turmel!

The reason for the new way was because I had to create a new custom solution for a customer, but the scope of the task was changed midway through, so it would actually be possible to have the query etc. running the old way.
