My installation was getting slower so I decided to move to MySQL:
recorder:
db_url: !secret database
Huge performance improvement! But I saw:
Database is about to upgrade. Schema version: None
In the logs, is that ok? I was always using SQLite, it automatically migrated all the data? Can I remove the home-assistant_v2.db? Or is it still used for other stuff? If not, will it cleanup after a while? The file is 8GB.
The warning is harmless and should only print the first time when the database is created.
The database starts out empty, no migration happens. Your performance improvement is unfortunately likely to be due to having dropped all data and things will probably slow down again as it fills up.
You can delete home-assistant_v2.db, that is for SQLite only. It will not be cleaned up automatically.
Thanks for the clarification! So in the database is only event data stored, where is the rest of the data? Like the users? I’ve downloaded the SQLite database to see which entities have the most records so I can exclude those.
Hello, I would like to migrate my sqlite database to Mariadb (Mysql), but I really want to do that for something.
Does the performance is really improve ?
Most of the current logbook/history slowness is due to architectural issues that are shared for all databases. So a change of database is unlikely to give a huge performance boost.