I'm experiencing strange query execution slowdowns, depending on how many iterations I make. Here comes simple script that I use (not exact copy of what I've done):
for i in range(0, number_of_iters):
conn = MySQLdb.connect(name_of_db)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-08-28
[sorry, here's another part]
curs = conn.cursor()
StartTime = time.clock()
curs.execute('select * from results')
print i, time.clock()-StartTime
curs.close()
conn.close()
del(curs, conn)
The query results ca 15k records, and I notice progressive delay, ie. 1st iteration takes <1 sec, second is 2,5sec, 3 - 8sec. After few rounds the processing time seems to stabilize on certain level, but this is of course not satisfying for me. It looks like some memory leak. I played around with garbage collector but without any further success. Any suggestions?
Regards,
Michal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm experiencing strange query execution slowdowns, depending on how many iterations I make. Here comes simple script that I use (not exact copy of what I've done):
for i in range(0, number_of_iters):
conn = MySQLdb.connect(name_of_db)
[sorry, here's another part]
curs = conn.cursor()
StartTime = time.clock()
curs.execute('select * from results')
print i, time.clock()-StartTime
curs.close()
conn.close()
del(curs, conn)
The query results ca 15k records, and I notice progressive delay, ie. 1st iteration takes <1 sec, second is 2,5sec, 3 - 8sec. After few rounds the processing time seems to stabilize on certain level, but this is of course not satisfying for me. It looks like some memory leak. I played around with garbage collector but without any further success. Any suggestions?
Regards,
Michal