#!/usr/bin/env python
import time
start = time.clock()
import cx_oracle
tns = cx_oracle.makedsn(‘127.0.0.1’, ‘1534’, ‘dsn’)
db = cx_oracle.connect(‘username’, ‘password’, tns)
def sqlselect(sql, db):
cur=db.cursor()
cur.execute(sql)
result=cur.fetchall()
cur.close()
return result
sql_1 = ” ”
sql_2 = ” ”
sql_3 = ” ”
sql_list = [sql_1, sql_2, sql_3]
for sql in sql_list:
result = sqlselect(sql, db)
print(result[0][0])
end = time.clock()
print(“\nrunning time: %f s” % (end – start))