Best practice for connections and cursors

Neil Cerutti neilc at norwich.edu
Thu Aug 1 11:20:32 EDT 2013


On 2013-08-01, Joseph L. Casale <jcasale at activenetwerx.com> wrote:
> A bit vague I know, but does anyone see the obvious mistake? I
> assumed the module setting up a singleton connection was a
> perfectly viable way to accomplish this?

My one db application started out creating a new connection to
the db (sqlite3) for every select and insert. When I converted it
to maintaining it's own single connection and creating new
cursors instead it was a huge speed increase. So I too am
interested in the answers you'll hopefully be getting. I have no
plans for utilizing concurrent access to the db, but maybe I'll
want to someday.

-- 
Neil Cerutti



More information about the Python-list mailing list