purge_table

Purges old data from a local table.

The function guarantees to keep data inserted at or after the specified timestamp and attempts to delete as much data as possible inserted prior to the specified timestamp to reclaim as much storage space as possible. Note that there is no guarantee about how much data will be deleted.

Available in a network database and requires the star$modify role.

Parameters:

Name Optional Type Description
table$ Mandatory Text The name of the local table to be purged
datetime$ Mandatory Timestamp The insert timestamp threshold

Example:

SELECT purge_table('mytable','2017-01-01'); -- reclaims space from data inserted prior to Jan 2017

Tips:

  • The star$tables view lists existing tables and their scope
Have more questions? Submit a request

Comments

Article is closed for comments.

Powered by Zendesk