2

I am programing under C++, windows, I want to retrieve all content in SQLite DB, so I make use of "select * from XXX", The DB is about 4M, However if the system restarted, the first time query will be really time consuming. I want to load the db file into memory, and execute select * from XXX in memory. Is it possible to do it? Many thanks!

2 Answers 2

1

Technically the database is loaded into memory when you open it. But you can have pure memory-based databases, too. In that case use :memory: as the path when opening the database.

Hope that helps. :)

Sign up to request clarification or add additional context in comments.

Comments

0

you could still do the following:

sqlite database < script

with script containing:

.output dump.sql
.dump
.output.stdout

then start an SQLite shell w/o any argument, and do .read 'dump.sql'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.