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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -