Reduce more than 90% your SQLite DB with DuckDB

Hello everyone,

I’m surprised not to have seen a topic about DuckDB, a database that can reduce the size of a SQLite database by more than 90%.

I’m following another French open-source home automation project, and the developer has just finished a series of tests on integrating DuckDB in place of SQLite, and the results are more than impressive.

Current SQLite database: 905 Mo
Database once migrated to DuckDB: 18 Mo. For 996k entries.

Have you already heard about this, or is the HA team already chatting about this database? Are there any technical limits to its use in Home Assistant?

Here’s the link to DuckDB and to the forum topic in question (link in French, but a small translator)

it’s very interesting

1 Like

Looks interesting!

I imagine that HA would want to test it for long-term reliability and also be convinced that it will be around for a a long time before adopting it as the internal DB.

In the interim, they could offer it as an alternative external DB - it would be interesting to see comparisons of it alongside all the currently supported DBs (apologies if this already exists):

  • SQLite (default)
  • MariaDB
  • MySQL
  • PostgreSQL
1 Like

If sqlalchemy doesn’t support it, there is no chance.

Database size isn’t the only criteria.

1 Like

The docs mention SQLAchemy but I don’t really understand it. Also this from searching online.

Agreed.

2 Likes