title: How to calculate a MSSQL query execution time using python
body: <p>can any one tell how to calculate a execution time of a MSSQL stored procedure query using python. I have a query like this</p>
  
  <pre><code> import pyodbc
  
   import timer
  
   DSN ='DRIVER=FreeTDS;SERVER=255.8.12.34;PORT=1433;DATABASE=CustomerFile;UID=Cust;
         PWD=Cust;TDS_Version=8.0;'
  
   cnxn =pyodbc.connect(DSN)
  
   cursor = cnxn.cursor()
  
   cursor.execute("select * from db.customer")
  
   d = cursor.fetchall()
  
   print d
  </code></pre>
  
  <p>i want to know the execution time of the query. I dont know how to do that. Pls help</p>
  
  <p>Expected output:</p>
  
  <pre><code> [(1, aa,vir,123/12, aaa@gmailcom,88898976),(2,bb,yuv,23/4, bbb@gmail.com,2124314)]
  
   Time Taken To execute: 10s
  </code></pre>