Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Oracle 10上使用预取的Python_Python_Oracle10g - Fatal编程技术网

在Oracle 10上使用预取的Python

在Oracle 10上使用预取的Python,python,oracle10g,Python,Oracle10g,有没有办法在这个程序中集成预取?我的目标是尽快从数据库中获取数据 正在获取10000行 cursor.arraysize=10000 import cx_Oracle import wx print "Start..." + str(wx.Now()) base = cx_Oracle.makedsn('xxx', port, 'yyyy') connection = cx_Oracle.connect(user name, password, base) cursor = connec

有没有办法在这个程序中集成预取?我的目标是尽快从数据库中获取数据

正在获取10000行

cursor.arraysize=10000

import cx_Oracle
import wx

print "Start..." + str(wx.Now())

base = cx_Oracle.makedsn('xxx', port, 'yyyy')

connection = cx_Oracle.connect(user name, password, base)

cursor = connection.cursor()

cursor.execute('select data from t_table')

li_row = cursor.fetchall()

data = []

for row in li_row:

    data.append(row[0])

cursor.close()

connection.close()

print "End..." + str(wx.Now())

print "DONE!!!"