title: pyodbc is very slow on my machine but not on other machines
body: <p>I am accessing a db2 (9.7) server running on the same network as my computer using python 2.7 and pyodbc 3.0.6.</p>
  
  <p>The following is a very stripped down example of something similar to what i am trying to do. </p>
  
  <pre><code>import pyodbc as db
  
  def dbcur(connectname):
      con = db.connect(connectname)
      cur = con.cursor()
      return cur,con
  
  
  def main():
  
      print 'a'
      cur,con = dbcur('DSN=MYODBCCON')
      print 'b'
  
  
      # X.name is a short varchar
      qry = """
          select
          X.name as N
          from schema.table as X
          """
  
      print 'c'
  
      cur.execute(qry)
  
      print 'd'
  
      c = 0
      for row in cur:
          c+=1
          if not c%100:
              print c, row
  
      return
  
  if __name__ == '__main__': main()
  </code></pre>
  
  <p>This code runs very slow on my windows 8 computer (100 rows in 10 seconds). However, on my colleagues computer with windows 7 this is lightning fast. His computer is simmilarly specced to mine, and he has the same versions of pyodbc and python, so i do not belive this to be an issue. </p>
  
  <p>The problem persists when i use both IBM DB2 ODBC DRIVER and IBM DATA SERVER DRIVER FOR ODBC.</p>
  
  <p>Any suggsetions as to why this is so slow?</p>
  
  <p>I am aware of things such as cur.fetchmany(), but i still expect this code to be much faster without using this.</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>It turns out that ODBC was slow because tracing was turned on. I disabled tracing and the performance was back to what I expected it to be. (Tracing can be found under ODBC Data Sources in Windows 7 and 8.)</p>