Methods for speeding up Logbook and History

Does anyone have idea’s / methods for speeding up the logbook and history?

Beside using exclude in the recorder so only my switches and sensor are recorded, I use the following to reduce the database size. This is my SQL commands and results on my database. The database is from 10 hrs of HA with only sensors and switches. After these command, there seems to be no negative affect on logbook or history although the size isn’t reduce much.

109,000 rows 43.4 MiB
DELETE FROM events WHERE event_type = ‘service_executed’
37228 rows affected.
72,508 rows 42.6 MiB
DELETE FROM events WHERE event_type = ‘call_service’
37228 rows affected.
35,280 rows 41.9 MiB

2 Likes