Logbook performance - move to external database?

Hey,
Logbook performance is poor for me. I click on it and it takes a minute or two to come back.

I’ve got about 10 days in there, and log about 4,000 entries per day. At what time do I move to an external DB? Is now the time?

I’m happy to give it a crack, but hopefully someone else has hit this problem and either found that it works or it’s a waste of time.

Thank you.

I don’t believe computer performance is the problem. It’s in a docker container with the host having a CPU average of 15% (peak 40%) & ram to spare. Disk is local spinning rust.

Mine used to take so long it would time out, I moved to mariadb externally (still on the same Pi) and there is now between a 10-20 second delay before its shown.

Could you give us some pointers on how to setup and configure that, I have looked at the option before but got lost…

I’m running venv and not a docker based one so from memory I just used apt to install mariadb, created a user for HA (mine is just ‘ha’), I believe I then created a database ‘homeassistant’ and gave ha full priviledges on it and then followed

HA configuration.yaml needed:

recorder:
  purge_keep_days: 7
  db_url: mysql+pymysql://ha:xxx@localhost/homeassistant?charset=utf8

If you are using docker here is a post I made on the same topic in another thread:

They’ve solved it in the 0.112 update. It’s fantastic.