Logbook & history take a looong time to load

Hi,

I have HA 0.59 running with mysql 5.5 in a docker environment on a Raspberry Pi 2.

The problem is that the Logbook and History entry in the main menu take a very long time to load (minutes!).
Example from yesterday evening: the Chrome network request to get the Logbook items took ~2 minutes to load the ~1500 items.

(A lot of these are Z-wave related and could even be omitted from the recorder, but then again, I only have 4 devices.This would only defer the issue to a later date when more devices are active)

A couple months ago the SQL queries of HA apparently were heavily improved to fix exactly this issue, but it sure doesn’t feel this way. I event switched from SQlite to Mysql because it was advised here in the forum that mysql has a better performance especially when the DB size increases. My current DB is only around 2months old since I switched from a Hassbian installation to docker without migrating any data.

I realize that a Rpi2 is not the fastest thing out there, but these query times seem way out of proportion for such a small installation. Apart from that, I think HA should at least cache the results of the history and logbook views so that it does not have to gather everything again when revisiting the tab after a while.

Any experiences with this?
Can this be improved?
Are maybe the table indexes missing/wrong/incomplete?

Thanks for you feedback
Jochen

I have the same issue, the logbook, which is useful for debugging, takes a very long time to load. Several minutes.