Skip to content Skip to sidebar Skip to footer

How To Efficiently Load Mixed-type Pandas Dataframe Into An Oracle Db

Happy new year everyone! I'm currently struggling with ETL performance issues as I'm trying to write larger Pandas DataFrames (1-2 mio rows, 150 columns) into an Oracle data base.

Solution 1:

As said in your question, you are not able to use method='multi' with you db flavor. This is the key reason inserts are so slow, as data going in row by row.

Using SQL*Loader as suggested by @GordThompson may be fastest route for relatively wide/big table. Example on setting up SQL*Loader

Another option to consider is cx_Oracle. See Speed up to_sql() when writing Pandas DataFrame to Oracle database using SqlAlchemy and cx_Oracle

Post a Comment for "How To Efficiently Load Mixed-type Pandas Dataframe Into An Oracle Db"