Well, results of the case were “That’s a Feature, not a Bug”.
I’ve filed an RFE to fix this feature at http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=115227 , I’d appreciate anyone who can help me upvote it.
In the meantime, even though I’ve manually deactivated theses analyses each time we resynchonize our custom checklists, I find that the property results are consuming 25 GB of my BFEnterprise database. Anyone have a suggestion on how to clean it up?
This query will show the results consuming the most space in the database:
use BFEnterprise
select e.Sitename, e.Name, l.computerid, l.AnalysisId, DATALENGTH(l.ResultsText) AS [Size] from LOCAL_OBJECT_DEFS e left join LONGQUESTIONRESULTS l on l.AnalysisID = e.ID where ComputerID is not NULL and e.IsFixlet = 1 and dbo.fn_ExtractField( ‘Fixlet Type’, 0, e.Fields ) = ‘Analysis’ order by 5 desc
adding a filter for “only results above 1 MB” showed me that only the “Measured Values” analyses were that large.
use BFEnterprise
select e.Sitename, e.Name, l.computerid, l.AnalysisId, DATALENGTH(l.ResultsText) AS [Size] from LOCAL_OBJECT_DEFS e left join LONGQUESTIONRESULTS l on l.AnalysisID = e.ID where ComputerID is not NULL and e.IsFixlet = 1 and dbo.fn_ExtractField( 'Fixlet Type', 0, e.Fields ) = 'Analysis' order by 5 desc
I can get the values for the primary key fields that I would want to remove from LONGQUESTIONRESULTS via
select e.Sitename, e.Name, l.computerid, l.AnalysisId, DATALENGTH(l.ResultsText) AS [Size], l.SiteID, l.PropertyID from LOCAL_OBJECT_DEFS e left join LONGQUESTIONRESULTS l on l.AnalysisID = e.ID where ComputerID is not NULL and e.IsFixlet = 1 and e.Name LIKE 'Measured%' and dbo.fn_ExtractField( 'Fixlet Type', 0, e.Fields ) = 'Analysis' order by 5 desc
… I think if I wrote a query to delete from LONGQUESTIONRESULTS the rows matching l.computerid, l.analysisid, l.SiteID, and l.PropertyID from this query, then used BESAdmin to resignsecuritydata, that I could shrink the database, reclaim the space, and get better SQL performance (as this 25 GB of unwanted results accounts for half of my database size). But I don’t know whether this operation is safe to do, or if there’s a better way to remove outdated LONGQUESTIONRESULTS from the database.