4
當試圖使用cx_Oralce從lob字段讀取數據時,我收到「exceptions.MemoryError」。這段代碼一直在工作,這個lob域看起來太大了。cx_Oracle MemoryError在讀取高速緩存時
Example:
xml_cursor = ora_connection.cursor()
xml_cursor.arraysize = 2000
try:
xml_cursor.execute(「select xml_data from xmlTable where id = 1」)
for row_data in xml_cursor.fetchall():
str_xml = str(row_data[0]) #this throws 「exceptions.MemoryError」