Currently, we use one single Sqlite DB file to host all data across users.
This approach does not scale up apparently.
A simple idea to scale up the system is to create a standalone DB file for each user.
If a particular user has too many logged queries history, we can hardcode a size budget (e.g., 1 million) and rotating the queries log.