# When does the Delete Records task of an SQL Transaction Group run?

**URL:** <https://forum.inductiveautomation.com/t/when-does-the-delete-records-task-of-an-sql-transaction-group-run/41446>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 11, 2020, 8:21pm UTC](https://forum.inductiveautomation.com/t/when-does-the-delete-records-task-of-an-sql-transaction-group-run/41446 "2020-12-11T20:21:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [December 11, 2020, 8:21pm UTC](https://forum.inductiveautomation.com/t/when-does-the-delete-records-task-of-an-sql-transaction-group-run/41446/1 "2020-12-11T20:21:42Z")

</div>

I’m experimenting with Transaction groups. I have data being logged to a table at the rate of 1 sample per second. I noted that with the “Delete records older than” option that:

1. When the limit was set to older than 1 minute, I would see up to 120 rows in the table IE 2 minutes worth of data

2. When the limit was set to older than 2 minutes, I saw over 200 rows in the table IE more than 3 minutes worth of data.

So what is the criteria for triggering a data deletion? Is it something like: 1 minute after number of rows has reached the limit? Or is it more involved?

---

<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:** [December 11, 2020, 8:25pm UTC](https://forum.inductiveautomation.com/t/when-does-the-delete-records-task-of-an-sql-transaction-group-run/41446/2 "2020-12-11T20:25:06Z")

</div>

Here you go. 🙂

> [@Delete records older than (Transaction Groups) - How does this work?](http://forum.inductiveautomation.com/t/delete-records-older-than-transaction-groups-how-does-this-work/36532):
>
> Question, when this setting is turned on, does this do a delete row as part of the same query call to SQL? or does it issue a second query immediately before or after the insert query? Just curious.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [December 11, 2020, 8:26pm UTC](https://forum.inductiveautomation.com/t/when-does-the-delete-records-task-of-an-sql-transaction-group-run/41446/3 "2020-12-11T20:26:45Z")

</div>

I’ll take it
