[DB Cleaner on Steroids] Improve AutomatedCleanup for large log file record sizes

Forge Component
(20)
Published on 19 May by Miguel 'Kelter' Antunes
20 votes
Published on 19 May by Miguel 'Kelter' Antunes

Hi,

The application is great, but we where faced with a customer that already had huge log file sizes.

Using the Automated cleanup would always generate timeouts, as the query to delete records was only filtering on the retention days.

In the end we cloned the application to customize the DeleteFromTableByDate action, to delete log file in batches of x-number of records (site.property), until the delete no longer returns a row count:

DELETE TOP (@TopRecords) FROM @LogTable 
WHERE Instant < @MaxDateToKeep

SELECT @RowCount 

Ideally we would like to keep using the Forge version, as it is actively maintained and we can then get rid of our cloned version.

Please consider this improvement, I am willing to implement it myself as a team member.

Regards,

Daniel

Hi Daniel,


Thanks for your message. We already do this on the error log page. We are also in the process of doing this same method in other places


Thanks


Stacey