Menu

Weird SELECT slowdown

Help
Anonymous
2003-08-28
2012-09-19
  • Anonymous

    Anonymous - 2003-08-28

    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)

     
    • Anonymous

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.