Search code examples
duckdb

how to vacuum (reduce file size) on duckdb


I am testing duckdb database for analytics and I must say is very fast. The issue is the database file is growing and growing but I need to make it small to share it.

In sqlite I recall to use the VACUUM commadn, but here same command is doing nothing. Size is the same.

how to reduce file size for duckdb database?


Solution

  • Seems that this option is not available yet. What I use is EXPORT database command , create a new clean data file and then IMPORT.

    Documentation here https://duckdb.org/docs/sql/statements/export