2

Does DolphinDB support auto delete of records in a stream table? For example, I wanted to delete some records that exceed the given length or are outdated?

The real-time data are useless after a certain time but their storage takes up lots of memory. Can I schedule a delete operation on the records from an hour ago in a DolphinDB stream table?

Polly
  • 603
  • 3
  • 13

1 Answers1

0
enableTableShareAndPersistence(table, tableName, [asynWrite=true], [compress=true], [cacheSize=-1], [retentionMinutes=1440], [flushMode=0], [preCache])

I would recommend you persist the stream table to disk in DolphinDB.

Set the parameter cacheSize to specify how many rows at most the table can keep, and the rest of data will be persisted to disk.

Also you can set the parameter retentionMinutes, indicating how long the persisted file will be retained on disk. The default time is a day and you can modify the value as small as you want.

winnie
  • 183
  • 1
  • 6