Skip to content

compactTable

compactTable(conn, schema, opts?): Promise<boolean>

Defined in: db/store.ts:266

Compact old data in DuckDB to control memory usage.

Keeps the most recent keepRecentRows at full resolution and downsamples older rows to targetOldRows using NTILE bucketing. Returns true if compaction was performed.

Assumes t values are unique (one per simulation step).

AsyncDuckDBConnection

TableSchema

CompactOptions = COMPACT_DEFAULTS

Promise<boolean>