There are 500million+ records in Test table, how to cleanup old data which are before 5years? It is badly affecting the performance and creating DB LOCK multiple times a day. can you guys share the sql query for it?
If you need to purge large amounts of old data from your TestRail instance, you would be able to automate the deletion of test runs and plans through the API by utilizing the
get_plans methods along with a filter (such as
created_before) to retrieve a list of old test run or plan IDs. Then, you can use
delete_plan for these runs and plans which you not longer need.
If you need additional details about these API methods, you can review this information here:
I hope this helps and please let me know in case you have any further questions!
Being millions of records api based approach fails to handle it. Dont we have a suggested SQL based methods to remove the records from database. Can you provide the SQL query for it.
Thanks for the reply! We wouldn’t provide SQL queries for this as the API would be the recommended method for safely managing TestRail data, even when deleting entities. Directly modifying TestRail’s database would not be supported at this time.
Please feel free to email us at firstname.lastname@example.org with additional details about your system, any error messages you receive, etc. and we’ll be glad to assist with this further.