#18082: get_indexes produces wrong resuls under oracle
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.4
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: oracle | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akaariai):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Part of the problem comes from having multiple indexes on the same column
(for example unique on firstname, lastname + a normal index on firstname).
In that case it was ordering dependent if the column was seen as unique or
not.
The attached patch simplifies the SQL, removes non-indexed columns from
the output and in addition handles the multiple indexes for the same
column by using GROUP BY + MAX.
I was wrong about the get_indexes calls taking a lot of time in the test
suite. The first call takes around a second, but after that the query plan
is cached and subsequent calls to get_indexes will be fast enough to not
be a bottleneck.
The introspection + inspectdb tests pass on Oracle 11g.
--
Ticket URL: <https://code.djangoproject.com/ticket/18082#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.