Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
How do I purge data in the PostGreSQL database using retention, how do I calculate the number of tuples in the PostgreSQL database. In Thingworx version 8.5, the OA_OpertorAdviso-extension existed, which provided the PurgeOldProperties service and the GetVSTuples() service. Does something similar exist in Thingworx Version 9.6? Where can I find it?
BR
Dimitri
I am afraid no such extension(not retention) exist for ThingWorx 9.x.
Please refer to PostgreSQL guide and find the corresponding SQL statements.
You can run those statements from ThingWorx by using a Database thing.
For example, below SQL returns dead and live tuples for each database table.
select n_live_tup, n_dead_tup, relname from pg_stat_all_tables order by relname
For how to use a Database thing inThingWorx, please refer to below article.
https://www.ptc.com/en/support/article/CS318728
To implement retention, you might implement a database Thing, which might take a date or relative time like days or month, and removes data from DB older then that.
Hi @dbologna ,
It appears that a response to this post answers your question. For the benefit of other Community Members who may have the same question, it would be great if you could designate the proper one as the Accepted Solution.
In the event that this response did not answer your question, please post your current status so that we can continue to support.
Thanks for using the PTC Community!
Regards,
wcui