# Dataset Optimization

**URL:** <https://forum.inductiveautomation.com/t/dataset-optimization/33556>\
**Category:** Ignition\
**Created:** [March 31, 2020, 4:41pm UTC](https://forum.inductiveautomation.com/t/dataset-optimization/33556 "2020-03-31T16:41:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [March 31, 2020, 4:41pm UTC](https://forum.inductiveautomation.com/t/dataset-optimization/33556/1 "2020-03-31T16:41:14Z")

</div>

I have an app with a main window that displays data, fixed number of rows/columns. 25 rows and 9 columns. My form shows each of these numbers in separate labels. I am using a sql statement to get each value. Of course it is hammering the server.

Looking for the best strategy to have one query, update every couple of minutes (other users/pages are updating certain columns) and display the data with individual labels. Each label would always reference the same row column.

I am thinking of some way to have the window (or transaction group or…) use a system.db.runQuery to update a dataset, and I can reference the row and column for each label to display the data.

Unless there is a clear path I am missing, can I…  
Can I reference a transaction group like a dataset? Reference row and column date some way?  
Create a custom property on a window that runs a query every couple of minutes and ref the dataset with row/colum?

Looking for a good strategy because I only need the window updated every couple of minutes with a single query.

Thanks

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 31, 2020, 5:34pm UTC](https://forum.inductiveautomation.com/t/dataset-optimization/33556/2 "2020-03-31T17:34:24Z")

</div>

Can you create a SQL/dataset tag and set it to a scan class with the time span you want?  
Then just bind the table to the dataset tag instead of a query.

---

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [March 31, 2020, 5:47pm UTC](https://forum.inductiveautomation.com/t/dataset-optimization/33556/3 "2020-03-31T17:47:59Z")

</div>

I do not have a table to bind the dataset tag to, can I bind label values to the dataset tag?  
Will look at creating a dataset tag (didn’t know there was such a thing)

Thanks
