#29262: Custom Left Outer Join in Queries
-------------------------------------+-------------------------------------
               Reporter:  Sassan     |          Owner:  nobody
  Haradji                            |
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Database   |        Version:  2.0
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:  ORM Join
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I need a query that contains a left outer join, the table has ~160,000,000
 rows and if I try to avoid outer join it'll reduce performance in an order
 that it'll be unusable.
 So my only choice is using raw method of the object's manager.
 I need to pass the queryset to rest framework so that it
 filter/sort/paginate/etc it.
 Rest framework needs a normal queryset (with count, filter, order_by, etc)
 and I'm trying to solve it with lots of hacks (proxying objects,
 overriding internal methods and changing the order they call other
 internal methods and changing some standard tested code in the overridden
 methods.)

 It's a terrible experience. I see requests and pull requests for
 supporting joins since 10 years ago and lots of related questions in
 stackoverflow, reddit and all around the web. So I'm here to ask you once
 again to do something about this issue.
 At least you can provide a way to modify the sql command that's going to
 send to database by normal query (not rawquery) and let the developer to
 take the risk and see if it breaks things and handle it himself. It'll be
 only used in edge cases by people who really need it and if they need it
 they probably know what they're doing. It'll be better than the nightmare
 developers have to deal while in need of custom queries.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29262>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.90a9c1e008beebaa07386960f92b23fd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to