Bugs item #1378208, was opened at 2005-12-11 20:32
Message generated for change (Comment added) made by sergeych
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1378208&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQLite
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: SQLite INSERT is painfully slow...
Initial Comment:
Hello, I wondered why creation of SQLObjects is
painfully slow on SQLite.
I came up to the following:
1) If I use connectionFromUri, and then extract cursor
by calling sqlhub.processConnection._conn.cursor(),
I still get EXTREMELY slow INSERTS (10-20 per second)
when i run .execute() method of the cursor with just
one argument (string).
2) If I use the following, it is very fast (of the :
import sqlite, sys
s=sqlite.Connection(sys.argv[1])
c=s.cursor()
lines=[]
for line in open(sys.argv[2],
"r"):
lines.append(line)
try:
if line[-2]==";":
c.execute(''.join(lines))
lines=[]
sys.stderr.write(".")
except:
pass
--
mg...@gm...
----------------------------------------------------------------------
Comment By: Sergey Chernov (sergeych)
Date: 2006-09-29 19:07
Message:
Logged In: YES
user_id=834669
-- can't use SQLobject because of it. Found that it is
caused by SQLObject flushing changes too often; as for
bulk insertions we have to use SQLite caching abilities
maybe together with transactoins; there should be a way to
dealy SQLObject calling SQLite.commit()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1378208&group_id=74338
|