# Table Delete Task Error

**URL:** <https://forum.inductiveautomation.com/t/table-delete-task-error/2301>\
**Category:** Ignition\
**Created:** [October 28, 2010, 6:35pm UTC](https://forum.inductiveautomation.com/t/table-delete-task-error/2301 "2010-10-28T18:35:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [October 28, 2010, 6:35pm UTC](https://forum.inductiveautomation.com/t/table-delete-task-error/2301/1 "2010-10-28T18:35:31Z")

</div>

Hi  
I am getting this error in the system console every hour but I am not able to find which table is causing the error. Is it normal for the delete records older than oprtion to run every hour or is it dependent on the execution rate of the group. Is it possible to find the table name in the wrapper files?

Thanks

Aidan

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/069e5b1bf520966c333a8f535c548c89e07a1d8b.JPG)

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 28, 2010, 11:05pm UTC](https://forum.inductiveautomation.com/t/table-delete-task-error/2301/2 "2010-10-28T23:05:16Z")

</div>

Actually, if it helps, it seems to be a table whose Index column is a DateTime instead of Integer.

While we don’t enforce it very well, the primary key/index column of SQL Bridge groups is intended to be an Integer. Making it something else can work, as long as you’re just inserting, but apparently breaks the “delete older than” clause.

For what it’s worth, it looks like we can fix the delete older than to work with dates as well as integers, moving further away from the “integer index only” rule.

Regards,

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 28, 2010, 11:09pm UTC](https://forum.inductiveautomation.com/t/table-delete-task-error/2301/3 "2010-10-28T23:09:47Z")

</div>

Also, to answer your question about how often it runs:

It is dependent on the value of the “delete older than” option. If your time period is less than 1 hour, it runs every minute. 1 hour to 12 hours, every 15 min. Above that, every hour.

Regards,

---

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [October 29, 2010, 8:59am UTC](https://forum.inductiveautomation.com/t/table-delete-task-error/2301/4 "2010-10-29T08:59:17Z")

</div>

Hi Colby

I removed the auto index on some tables and used the t\_stamp as the index instead. I have stopped the auto delete for the time been to stop the errors. The tables don’t grow to fast so I can manage it manually for the time been. It would be great if you were able to make it work with dates.

Thanks

Aidan

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 29, 2010, 6:08pm UTC](https://forum.inductiveautomation.com/t/table-delete-task-error/2301/5 "2010-10-29T18:08:25Z")

</div>

Version 7.1.7 will support ‘delete older than’ on tables with non integer indexes.

I just want to mention again, though, that having the group set to use a non-integer index is only roughly supported- for groups simply inserting data, it won’t be a problem, but with “update first/last” it still won’t work. That “index” column is meant to be a unique primary key, and timestamps generally aren’t very suitable for that. Also, it’s worth noting that when the SQL Bridge creates a table and creates the “t\_stamp” column, it also creates an index on that column. So, there’s no performance gain at all switching it to be the “index” in the group settings.

Regards,
