CX_ORACLE vs JAVA OCI performance
"kurtosis kurtosis.org" <kurtosis-/[email protected]> Fri, 5 Feb 2016 18:49:40 -0500 (EST)
| Newsgroups | gmane.comp.python.db.cx-oracle |
|---|---|
| Message-ID | <144574355.35380.1454716180097.JavaMail.vpopmail@atl4oxapp111.mgt.hosting.qts.netsol.com> |
Hi Anthony, First, let me thank you for the effort you have put into cx_Oracle. It’s a great product and very useful. I have been doing some performance testing lately and I’ve noticed some interesting differences in the way cx_Oracle performs versus other platforms (Java, C#) and wanted to let you know about them. First the good news – cx_Oracle is very fast in certain situations, more than twice as fast than Java OCI. In other situations, it performs much worse. To do my testing, I created a table of numbers in different configurations. Each table was 500 columns with 10,000 rows. I created tables with different types: NUMBER(*,8), NUMBER(*,18), NUMBER(*,38), and BINARY_DOUBLE. For NUMBER (*,8), NUMBER(*,18), and NUMBER(*,38) performance is great. I did 250 select * from the tables, below is the average time in seconds it takes to get results back: TABLE PYTHON JAVA tbl_n8 1.0513 2.5052 tbl_n18 1.1196 2.7348 tbl_bd 0.8423 1.8668 However when we go to NUMBER(*,38) performance is much worse: TABLE PYTHON JAVA tbl_n38 8.5739 2.8539 I then tested some views in various configurations. Notably I found that any time one does a math operation in a sql statement cx_Oracle slows down. Using TRUNC(col, 18) to downcast precision, same result. VIEW PYTHON JAVA v_t18 9.2087 3.3632 v_f18 9.8412 3.3678 I may be doing something wrong, but from my perspective, I’m just using the library in the usual way. If you are interested, I’m happy to send along the ddl and py code I used to produce these results. Thanks, --Kurt ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ cx-oracle-users mailing list cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/cx-oracle-users