#28670: django/db/backends/oracle/compiler.py handling of LIMIT+OFFSET could be
better in Oracle 12+.
-------------------------------------+-------------------------------------
               Reporter:  Markus     |          Owner:  nobody
  Stenberg                           |
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:  Database   |        Version:  2.0
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Currently the code which does the LIMIT+OFFSET clause emulation there with
 ROWNUM (which assorted sources on the internet recommend not to do) is no
 longer needed. Oracle 12 supports  SQL syntax for this:

 https://oracle-base.com/articles/12c/row-limiting-clause-for-top-n
 -queries-12cr1

 {{{
 [ OFFSET offset { ROW | ROWS } ]
 [ FETCH { FIRST | NEXT } [ { rowcount | percent PERCENT } ]
     { ROW | ROWS } { ONLY | WITH TIES } ]
 }}}

 This applies to all versions, but is probably reasonable to implement in
 2.0+ onlyas then there is no need to worry about Oracle 11 which does not
 support the syntax.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28670>
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/049.a9220e8fe03ca553cf9af3aa21638296%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to