From 19k to 4.2M events/sec: story of a SQLite query optimisation | Not Hacker News!