Hi

I was wondering if someone could help with the import statements needed
to use the timeit module in the following code. I need to access the
"cur" object.

Thanks,

import cx_Oracle
import timeit

def VerifyTagIntegrity(con, TableOwner):
    cur = con.cursor()
    sql = 'select (select count(*) from %s.f4111) as F4111_COUNT,
(select count(*) from %s.f4111_tag) as TAG_COUNT from dual;' %
(TableOwner, TableOwner)
    print "      SQL: %s" % (sql)
    timer = timeit.Timer('cur.execute(sql)', 'from __main__ import
cur')
    print timer.timeit()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to