cx_Oracle.DatabaseError: ORA-12847: retry parsing due to concurrent DDL operation

531 Views Asked by At

I'm reading data from Oracle DB on python cx_Oracle. But sometimes it throws

ORA-12847: retry parsing due to concurrent DDL operation

I couldn't find anything about it on internet. It's just a select statement with some joins. Query result has almost 10M rows. There is nothing wrong in explain plan.

here is my code snippet:

with connection.cursor() as cursor:
    #cursor.prefetchrows = 2000000
    cursor.arraysize = 250000
    cursor.execute(query)
    data_list = cursor.fetchall()
    data_columns = [x[0] for x in cursor.description]
    print("I got %d lines " % len(data_list))

the error occurs at cursor.fetchall() line.

0

There are 0 best solutions below