3

Our TFS database size was growing really quick and I figured out that the issue was with tbl_TestResult table. I am not sure why it is growing that fast. It seems there will be a record for each test case. In my case, we have more than 1000 test cases that will be fired in each check-in. That means we do average 20 check-ins a day. That is around 20,000 records.

My question is can I manually delete the records on that table? Will it make any problems to the TFs other than losing the tests results?

UPDATE:

We have TFS 2015

Dilshod
  • 3,189
  • 3
  • 36
  • 67

2 Answers2

4

Deleting data manually or changing the schema in any way would result in your TFS instance no longer being supportable by Microsoft. It effectively invalidates your warranty.

In TFS 2015 you can change the Test Management retention settings in the Team Project admin page. Default is 30 days, but someone may have changed it.

Other than that this is the normal meta data that is collected as part of your ALM/DevOps platform. **

  • I didn't check that, but what is the solution then to fix the issue. Can you give me a solution? – Dilshod Dec 10 '16 at 04:41
  • The size of the data might just be the size of the data. TFS cleans out older records and data size. But that's pretty big. Can you confirm that you have the data retention set to 30 days? – MrHinsh - Martin Hinshelwood Dec 10 '16 at 09:42
  • I looked at the test retention settings and it was set to never delete. So I set it to 20 days now. Will that remove the previous test results, or should I delete them manually? My Test results size is 213GB. – Dilshod Dec 10 '16 at 10:01
  • It looks like the downvote was putin by me. I am not sure how it happened. Can you please change your answer little bit so that I can remove the downvote? It is not letting me now. – Dilshod Dec 10 '16 at 13:09
  • 1
    Done - once you change the retention back to a reasonable timeframe it will take a little while for it to clean off automatically. It tries to not impact server performance. – MrHinsh - Martin Hinshelwood Dec 12 '16 at 20:51
2

This was "fixed" in TFS 2017 because they changed the schema for the test results https://www.visualstudio.com/en-us/news/releasenotes/tfs2017-relnotes#test. Brian Harry mentioned a 8X reduction in storage from the new schema https://blogs.msdn.microsoft.com/bharry/2016/09/26/team-foundation-server-15-rc-2-available/

nschonni
  • 4,069
  • 1
  • 28
  • 37