469,581 Members | 2,032 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,581 developers. It's quick & easy.

memory-leak in pysqlite 2.3.0 ?

After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
sqlite database increases memory consumption heavily. A similar program
with Ruby and sqlite-ruby 1.1.0 does not affect memory consumption at
all.

Here a short example:
-------------------------------
#!/usr/bin/env python

import os
from pysqlite2 import dbapi2
print dbapi2.version

db = dbapi2.connect("bla.db")
c = db.cursor()

c.execute("create table b (c integer)")

for i in xrange(10000000):
c.execute("insert into b values (%d)" % i)

----------------------------------

System in use:
Python 2.4.1, Sqlite3 3.3.6, Pysqlite 2.3.0

Regards,
Michael

Jun 19 '06 #1
1 1739
In <ma***************************************@python. org>, Michael Husmann
wrote:
After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
sqlite database increases memory consumption heavily. […]

Here a short example:
-------------------------------
#!/usr/bin/env python

import os
from pysqlite2 import dbapi2
print dbapi2.version

db = dbapi2.connect("bla.db")
c = db.cursor()

c.execute("create table b (c integer)")

for i in xrange(10000000):
c.execute("insert into b values (%d)" % i)


Just a guess: Commit the changes from time to time.

Ciao,
Marc 'BlackJack' Rintsch
Jun 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Frank Esser | last post: by
9 posts views Thread by Mike P | last post: by
12 posts views Thread by Jeremy | last post: by
22 posts views Thread by xixi | last post: by
8 posts views Thread by vikram | last post: by
14 posts views Thread by Alessandro Monopoli | last post: by
13 posts views Thread by hurry | last post: by
1 post views Thread by Nick Craig-Wood | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.