On 20/08/2005, at 10:42 PM, Kevin Dangoor wrote:
Tomek Piatek wrote:
First of all, let me tell you how great this module is. I am new to
Python. I have been programming in Perl for years and I still have to
at work. But for my own projects I use only Python. Anyway, SQLObject
makes almost everything to do with databases painless. I say almost
because inserting 5600 simple records is just so slow. On my dual G5
PowerMac it takes about 32 minutes with SQLite backend. If I perform
the same insertion but using pysqlite it all happens in about 5 seconds
because I don't have to commit until I'm done inserting all the records.
Inserts are a bit slow; going around SQLObject to do inserts is
generally much faster. You can use connection.query() to run SQL on the
Just to confirm something from the original posting: was SQLObject's
autocommit on or off when doing these inserts? Doing 5600
insert/commit/selects will definitely be far slower than 5600
insert/selects followed by a commit.
As far as I am aware there is no such thing as auto-commit in SQLObject. At least I haven't found anything like that.
I am aware that there are lazy updates for the sql update operation but that's it. Inserts are performed immediately.
If you know how to turn auto-commit off then please let me know.