On 9/8/2010 10:09 AM, Stef Mientki wrote:
hello,
I wrap my database in some class, and on creation of the instance, a connection
to the database is
created,
and will stay connected until the program exists, something like this:
self.conn = sqlite3.connect ( self.filename )
Now I wonder if there are pros or contras to keep the connection to the database
continuously "open" ?
thanks,
Stef Mientki
Open is OK. Open is good, because the database system
gets to cache some data. Open with an uncommitted transaction
may leave the file locked, preventing access by other processes.
So make sure you commit before you go idle.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list