Is there a way to load an entire SQLite database into memory for faster results, using the sqlite3 CLI tool? Thanks!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure of what you are trying to accomplish here, but I have two ideas to propose:
1- Copy everything from your database to some attached in memory database. This link will tell you how to attach an in memory database: http://www.sqlite.org/lang_attach.html
2- Increase your cache size, keep transactions in memory, and keep the “temp store” in memory:
http://www.sqlite.org/pragma.html#pragma_cache_size
http://www.sqlite.org/pragma.html#pragma_journal_mode
http://www.sqlite.org/pragma.html#pragma_temp_store