SQLite Forum

SQLite File size not increased with chunk size
Login
You might consider:
<ul>
<li>Creating a dummy table.
<li>Use a CTE to insert sufficient data to grow your database to a maximum anticipated size
<li>Run vacuum
<li>Drop the dummy table.
<li>Possibly run a defragmentation utility on your disk as appropriate
</ul>

Your database should now retain its size and low fragmentation.

Of course, even if you should exceed your new file size, nothing tragic happens.

If you are frequently creating new such databases, you can prepare a big empty database file in advance, and just copy it into place for each new one.