import MySQLdb
db=MySQLdb.connect(db='pdb',user='pdbase',passwd='xxxx',use_unicode=False)
curs=db.cursor()
curs.execute('SELECT * FROM ATOM_SITE;')
erg=curs.fetchall()
curs.close()
del curs
del erg
db.close()
del db
The python interpreter uses after this select about 600 MB Memory and stays at this size. Shouldn't the memory been freed? I tried this with and without unicode. if i do this a second time the interpreter grows to~900MB third time it stays there. whats happening? shouldn't the memory br freed?
regards,
bjoern Thorwirth
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I've the following problem:
When i do a select on a big table like this:
import MySQLdb
db=MySQLdb.connect(db='pdb',user='pdbase',passwd='xxxx',use_unicode=False)
curs=db.cursor()
curs.execute('SELECT * FROM ATOM_SITE;')
erg=curs.fetchall()
curs.close()
del curs
del erg
db.close()
del db
The python interpreter uses after this select about 600 MB Memory and stays at this size. Shouldn't the memory been freed? I tried this with and without unicode. if i do this a second time the interpreter grows to~900MB third time it stays there. whats happening? shouldn't the memory br freed?
regards,
bjoern Thorwirth
python-2.6 MySQLdb 1.2.3c1 and svn
sorry ... interpreter size after 4 executions beginning at line cur=db.cursor() leads to 1.5 GB Interpreter