Why is list(Model.objects.all()) 10x slower against an Oracle database as compared to Postgres?

53 views
Skip to first unread message

Daniel Porter

unread,
Mar 24, 2015, 4:49:48 PM3/24/15
to django...@googlegroups.com
I have an application that we run locally against a postgres database but our dev/test/prod servers all run Oracle.

The command list(Person.objects.all()) runs remarkably faster against my local Postgresql database. It takes at least 10x longer against an Oracle database. The thing is the query itself doesn't seem to be holding it up. 

I don't really know how to track this down without going and putting random print datetimes in the django sourcecode. I'm using django 1.4, and the cx_oracle driver to communicate with oracle.

Avraham Serour

unread,
Mar 25, 2015, 5:49:05 AM3/25/15
to django...@googlegroups.com
try using a more recent version of django to see if the issue is resolved, it could also be a driver problem, what version of cx_oracle are you using? what python version are you using?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/71838191-10d0-497f-8399-7b533ebd4e0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tkdchen

unread,
Mar 26, 2015, 10:02:20 PM3/26/15
to django...@googlegroups.com

First, you can catch the SQL generated for Person.objects.all(), and evaluate that SQL's performance in Oracle.
Reply all
Reply to author
Forward
0 new messages