TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
Database Purge utility
Sometimes I see some performance issue when there are lot of deleted records in the data base. My data base does have lot of daily transactions so it creates a lot of deleted records too. Though system purges these after 30 days automatically but that I think a bit late when there are lot of deleted records exist.

So I would like to see some functionality or tool in the data base so that we can automatically (using a periodic trigger) or manually purge the data base. Currently if we want to purge the deleted records we can do it only 200 records at a time which is very time consuming.

Joseph Kurian
Date Created
9/2/2021 8:47:04 AM
Date Updated
9/10/2021 3:33:33 PM
New Idea
Promoted By
Billy Hodgescalvin petersNick Ashcroft
Patricio BustosJoseph Kurian
Nick Ashcroft 9/2/2021 11:18:51 AM
I would also additionally like an option to
- delete the entire contents of a table (same as is possible in table setup) using the API instead of looping through records
- define an action to delete multiple records in a table meeting some criteria (a bit like a recordset but without defining a parent-child relation)
Joseph Kurian 9/2/2021 11:27:36 AM
Nick - I think you can delete the entire table records using a trigger. Define the condition for the trigger so that the entire records will be selected and when the trigger is executed the entire table records will be deleted.
calvin peters 9/2/2021 3:13:47 PM
i believe this can be achieved when the records are first deleted (relegated to Recycle Bin for 30 days) unless there is some reason you need to retain them in the Recycle bin for a period of time as a "just in case"

If you do not need to be able to recover them for any reason, then using the API a record can be "purged" rather than "deleted" and relegated to the recycle bin. The upside is no purging of recycle bin later...the down side is in the event of a mistakenly deleted record it is not recoverable.

Not sure if that would solve your problem but it solved mine.

Joseph Kurian 9/2/2021 3:56:11 PM
I delete records both using API and by the Teamdesk Triggers. Teamdesk Trigger deletion I think there is no option to bypass recycle bin.
calvin peters 9/2/2021 4:04:12 PM
Try Using something like this


URL Endpoint will be as usual like:<your db id #>/<table>/delete.json?key=<%<your record key%>&purge=true

Like that adding the "purge=true" parameter to the end of your URL should do the job for you

Joseph Kurian 9/2/2021 4:14:24 PM
I was talking about the data base trigger in the Teamdesk system. I delete master file records using API. I can construct the URL the way you described. But I have a database trigger in the master table when a record is deleted it should delete the child records. Those child records deletion I do not see an option to by pass recycle bin.

Billy Hodges 9/10/2021 3:33:33 PM
It would be GREAT to be able to have options for the current, hard-coded 30-day auto-purge. Obviously, we don't want TD servers filled with deleted records in perpetuity...but if we could have the option to select a 30, 60, 90, or 120-day option, that would be great.
Back to Search Results