Often when we do system refresh/SID/Hostname change or any BASIS maintenance activity we see old data in ST03n.
For example lets assume my production instance system name is PRD and quality is QAS. If I refresh QAS system with PRD backup then as a post activity, We have to delete the old data from ST03n
Solution 1:
I personally prefer solution 2 it is quite simple. One way is go to tcode ST03n and delete the unwanted entries.
Tcode ST03n –> Performance Database –> Workload Collector Database –> Contents
Tcode ST03n --> Performance Database --> Workload Collector Database --> Contents
Select the old statistics data and delete

Solution 2:
Execute function module SWNC_COLLECTOR_CLEAN_SWNCMONI from Tcode SE37. This FM will delete the entries of old or incorrect SID.
Execute function module SWNC_COLLECTOR_CLEAN_SWNCMONI from Tcode SE37. This FM will delete the entries with incorrect SID
Simply execute it without entering any values
