X

TimesTen In-Memory Database
for Extreme Performance

Is the Python cx_Oracle SQL Driver fast enough for Database Benchmarks?

Doug Hood
TimesTen Cloud Product Manager

I have been working on a customer database benchmark where latency and throughput are critical. The customer provided me with some sample code in Python which used the cx_Oracle driver. I was concerned that either the Python language or the cx_Oracle SQL driver would be the bottleneck and whether I would need to re-write the benchmark in 'C' using OCI or ODBC.

Same Python Code works with both the Oracle DB and TimesTen

My target was 300K queries per second, where each query consisted of a four table join + 2 single table queries.

After some SQL tuning [ie using the TimesTen Index Advisor] I was able to achieve 11.3 million queries per second on a single VM in Oracle Cloud using 27 database connections with Oracle TimesTen 18.1.1.4.0.

Given that 11.3 million is significantly faster that 300K, I concluded that using Python with the cx_Oracle driver was 'fast enough'!

  • The cx_Oracle driver for Python is available here
  • Oracle TimesTen Scaleout is available here
  • The Oracle 18c Database is available here

As a bonus, the exact same Python source code worked for the Oracle Database and Oracle TimesTen. ie I just needed to change my tnsnames.ora service name to point to either the Oracle or TimesTen Database.

Disclaimer: These are my personal thoughts and do not represent Oracle's official viewpoint in any way, shape, or form.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services