Skip to main content
1-Visitor
July 8, 2019
Solved

Purge stream entry and purge all property values services are not physically delete Postgres db rows

  • July 8, 2019
  • 1 reply
  • 3109 views

Hi

 

Eventhough if i execute Purge Stream entries and purge all property values from the thingworx composer are not directly impact in the  Postgres DB Table rows.

 Am expecting to delete unnecessary entries in Value Stream and Stream data, I can able to  sucessfully purge thing properties for Past date from the thingworx service but after the thingworx purge service excution number of rows in the postgres value_stream  table are remain same Why?

 

 

Best answer by Constantine

Also, note that ThingWorx stores all streams in the same DB table. There are system streams, e.g. AlertHistoryStream, which may have thousands of rows. This may explain why there are 4111 rows in the table even though you have only 14 entries in your Stream. Finally, since you are already in pgAdmin, you can do a SELECT * FROM STREAM and see what data is there.

1 reply

Community Manager
July 11, 2019

Hi @sarathi.

 

Please send us a screenshot of the service you are referring to. We're having difficulty understanding the issue and that may help to clarify.  Also, how are you checking the number of rows?  If you can share your query, that would be helpful.

 

Regards.

 

--Sharon

Community Manager
July 19, 2019

Hi @sarathi.

 

Just following up on your post.  Have you resolved your issue?  If not, please provide the artifacts requested from the previous post and we will try to assist.

 

If you have resolved it, please feel free to post the details of the solution here and mark it as the Accepted Solution for the benefit of others on the community.

 

Regards.

 

--Sharon

sarathi1-VisitorAuthor
1-Visitor
August 1, 2019

Hi @slangley 

Sorry for the late reply

We are using Thingworx 8.3  configured with postgres 9.4 , we are looking to delete old history data periodically in stream and value stream entries in order to improve the query performance.

 

My question was Number Rows in Postgres DB was same before and after excution of PurgeStreamEntries and

PurgeAllPropertyHistory service from thingworx application.

 

Capture1.PNGCapture2.pngCapture4.PNGCapture7.png