#20414: Handling of numbers under oracle is slow ----------------------------------------------+---------------------------- Reporter: shai | Owner: shai Type: Bug | Status: new Component: Database layer (models, ORM) | Version: master Severity: Normal | Keywords: oracle Triage Stage: Unreviewed | performance Easy pickings: 0 | Has patch: 1 | UI/UX: 0 ----------------------------------------------+---------------------------- With current code, for all number columns, the Oracle backend asks cx_Oracle to return the numbers as strings, and then transforms them back to numbers on the way out. All this is done because Oracle supports higher precision (and a wider range of integers) than the Python `float` type; some values, if they are to be reported accurately, must be returned as `decimal.Decimal`s, and cx_Oracle doesn't apparently do that on its own.
With cx_Oracle 5, though, it is possible to use a much better approach, on a per-column (rather than per-row) basis, selecting the right output type when there is enough information to do so, and making most of the decisions once-per-query instead of once-per-row. An original patch for this was written by Ian Kelly; I improved it and made a pull-request in the stretch towards 1.5, but there was no ticket for it and so it was never merged. I hope we can finally merge it into 1.6. There was a little saga of discussions around this (mostly Anssi, Ian and myself, https://groups.google.com/d/topic/django- developers/4BNkJyGez9A/discussion). Some other issues are also mentioned there. But this is the main one. So now there is a ticket. Things changed, and the pull-request needed updating. The new one is at https://github.com/django/django/pull/1071. -- Ticket URL: <https://code.djangoproject.com/ticket/20414> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.