DEV Community


Posted on

👮‍♀️IMMUTABLE Tables👮‍♂️

IMMUTABLE table example

👉 IMMUTABLE tables: Insert-only tables in which existing data cannot be modified. Deleting rows is either prohibited or restricted based on the insertion time of the rows.

☝ an example of such an IMMUTABLE table used to store orders as JSON data. You may (for legal reasons) be able to delete data but only after waiting for 30 days. Also, you can drop the table but only after 16 days without any activity on it. Setting the database parameter blockchain_table_max_no_drop to 0 before creating such tables can help for dev/test! Finally, you can use DBMS_IMMUTABLE_TABLE.DELETE_EXPIRED_ROWS to delete expired rows.

⚠ feature backported to 19.11 version.

Learn more:

Top comments (0)