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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Daniel Porter
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

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

Avraham Serour
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?

On Tue, Mar 24, 2015 at 9:05 PM, Daniel Porter <[hidden email]> wrote:
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAFWa6tLDef1b-zUek8bN8tiR3heS5AhyYXv21a5O7eJAv-V09g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

tkdchen
In reply to this post by Daniel Porter


On Wednesday, March 25, 2015 at 4:49:48 AM UTC+8, Daniel Porter wrote:
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.

First, you can catch the SQL generated for Person.objects.all(), and evaluate that SQL's performance in Oracle.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/d92c6d14-58ea-4f02-9d80-176e6dddd90c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.