In some cases, one wants to manually delete change records from the staging area, for example, change records that are older than 24 hours.

This can be achieved using the following query against the staging area:

delete TORDER where context in (select context from TORDER where datediff(HOUR,current_timestamp(), {ts substr(timestam
p,1,10) || ' ' || substr(timestamp,12,9)}) > 24 limit to 1000 rows);
You can replace 'TORDER' with the name of your change table, HOUR with another time measure, 24 with a different time quantity (here it referred to 24 hours) and 1000 with a different amount of rows to delete in one pass.

It is not recommended to issue this statement without specifying a limit since the delete will try to lock the records before deleting them. The query can be run repeatedly or on some schedule.