python - Django: Extremely Large Queryset Slow to Execute (non-linear retrieval time) -


i having django (oracle backend, cx_oracle 5.2.1) execute query simple

   select x.y, x.z x x.a = 'foo' , x.b = 'bar' 

both x.a , x.b indexed (db_index=true)

the page use calculates summary statistics on various records using pandas, data sizes quite large.

i have 1 page loading subset of ~15000 records. takes ~2 seconds load

the exact same page, when using different timeframe, using same type of query loads ~50000 records. takes ~30 seconds load. i've benchmarked performance, , pandas not bottleneck.

the simple

my_queryset.all().values(('y', 'z'))  

takes overwhelming majority of time (~90%)

is there reason why is, or way speed up?

of note, when executing these queries in database console, both fast. seems django orm has issues.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -