驱动:cx_oracle(python 2.7+oracle10g)点击打开链接,
http://cx-oracle.sourceforge.net/
import time
import cx_Oracle
con = cx_Oracle.connect('user/passwd@127.0.0.1/orcl')
start = time.time()
cur = con.cursor()
cur.arraysize = 100
cur.execute('select * from atable')
res = cur.fetchall()
elapsed = (time.time() - start)
print elapsed, " seconds"
cur.close()
con.close()
注:安装cx_Oracle需要注意两点:1.追加$ORACLE_HOME/lib到环境变量LD_LIBRARY_PATH
2.关闭selinux