cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

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

sarathi
14-Alexandrite

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

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?

 

 

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

6 REPLIES 6
slangley
23-Emerald II
(To:sarathi)

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

slangley
23-Emerald II
(To:slangley)

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

sarathi
14-Alexandrite
(To:slangley)

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

 

Hello,

 

Are you executing PurgeAllPropertyHistory on a Thing with logged properties, or on the Value Stream itself?

 

/ 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.

sarathi
14-Alexandrite
(To:Constantine)

Hi @Constantine 

 

I Executed  PurgeAllPropertyHistory at Thing Level, Thank you for input , count reduced appropriately  after table refresh using PGADMIN

Announcements


Top Tags