# Best practices when data source is a database

**URL:** <https://forum.inductiveautomation.com/t/best-practices-when-data-source-is-a-database/59998>\
**Category:** Ignition\
**Created:** [May 25, 2022, 6:02am UTC](https://forum.inductiveautomation.com/t/best-practices-when-data-source-is-a-database/59998 "2022-05-25T06:02:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravindan.s](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@aravindan.s](https://forum.inductiveautomation.com/u/aravindan.s)\
**Post date:** [May 25, 2022, 6:02am UTC](https://forum.inductiveautomation.com/t/best-practices-when-data-source-is-a-database/59998/1 "2022-05-25T06:02:30Z")

</div>

Hi ,

I am having a scenario where all the data comes from MS SQL database .  
The requirement includes Alarming for which i need to move all the data into tags.

The scale of this data that i need to query from database is what i am worried about .

There are like 20000 individual SQL tags of type Integer, float and string or 2000 SQL tags of type dataset . SQL tags will be randomly queried at interval of 3 to 4 hours sometimes even altogether.

Will this approach affect the performance of the ignition system ? is it even possible ?

Thanks &regards,  
Aravindan.S

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 25, 2022, 7:23am UTC](https://forum.inductiveautomation.com/t/best-practices-when-data-source-is-a-database/59998/2 "2022-05-25T07:23:57Z")

</div>

Something that might make things easier would be to know if there is a timestamp in the database. If there is then you could periodically poll the database to return a list of all the alarms which had events since the last poll and use that to update the tags by script.  
The alternative - and possibly easier - would be to poll the database on schedule and update or create tags as the results come in.
