06-25-2025 07:11 AM
While running test I found out that having your sqlite database in RAM instead of on disk would speed up the query execution substantially.
And I found a rather simple way to "clone a database from file into memory", at first I tried with VACUUM but couldn't get it to work.
I thought I'd share my method, maybe someone has a better one.
Anyway, here's what I came up with
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-25-2025 02:59 PM
Note: that sqlite_master table also contains the exact SQL that the table was created with. You can use that to create identical tables in your memory db (CREATE TABLE...AS... won't include things like primary or foreign key definitions and the like).
BTW, in Windows at least, the Windows File Cache generally makes things in memory without doing something like you're doing, but I think you are using Linux.
06-26-2025 12:44 AM
Indeed I am on Linux.
Thank you for the advice, I will look into this.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus