简体   繁体   中英

cx_oracle and sqlalchemy performance comparison

I am working oracle database and wanted to know which toolkit (sqlalchemy or cx_Oracle) is better in performance as I can't see any comparisons online I hope someone can help me. I have listed the key performance indicators that I need to be addressed.

Bulk insertion and single line insertion
connections complexity
which one can be used for streaming more efficiently
Which one is better for OLTP connections (loading data from OLTP with that toolkit) 

However more that these comparisons are highly appreciated

My Target and Source databases are Oracle

A comparison of the cx_oralce and sqlalchemy

SQLAlchemy is a layer on top of cx_Oracle so it will always have more overhead.

When looking for performance, you should evaluate the latest cx_Oracle release (now called python-oracledb) since the new Thin mode has some advantages (eg with DB Object types ). See the release announcement for information about python-oracledb. Also see this blog post about using SQLAlchemy 1.4 with python-oracledb.

Fundamentally, you need to decide which coding style (ORM or raw API calls) you want to use. You may also want to look at pandas, which uses SQLAlchemy. And you should benchmark in your own environment with your own code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM