On Tue, Nov 12, 2013 at 8:06 AM, Stelling Carsten <
[email protected]> wrote:

> Hello SQLite users,
>
> I was wondering, if closing the database connection after each transaction
> is a good idea.
>

No, it is usually a bad idea.  There are non-trivial costs associated with
reopening the database connection.



> Possibly I've missed the thread concerning this topic. If this is true,
> please supply me with this link.
>
> Otherwise, can anybody give a reliable advice to do it in this or that
> way. I found some conflicting posts on other lists, and I'm unsure to
> procceed.
> In fact, opening and closing the DB connection for each transaction will
> waste CPU ressources and time. But possibly there is a reason to do so.
> Assuming that fsync() works correcly, there should be no need to close the
> DB connection, if only a few processes are using a single DB.
> My operating system is Linux and the SQLite 3.7.9 database files are
> stored in NAND Flash.
>
> Regards,
>
> Carsten
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to