ADQL - adding LIMIT or FETCH

Walter Landry wlandry at caltech.edu
Tue Apr 12 21:27:14 CEST 2016


Patrick Dowler <pdowler.cadc at gmail.com> wrote:
> As far as I can see, Sybase ASE (15.x) does not support LIMIT or
> OFFSET.  I don't see anything about Oracle above and that is used by
> ALMA and could be adopted by other projects for "reasons".

We (IRSA) also use Oracle.  Oracle added OFFSET in version 12, but we
are stuck on 10.2.  The workarounds I have seen are pretty ugly and
inefficient [1].  It requires rewriting the query to add a row number.
Then we filter based on that row number.  Finally, we would have to
remove the row number (but only if the user did not ask for it!).  So
there is a fair amount of query analysis that I do not want to think
about.  That makes it sufficiently annoying to implement such that
we would probably upgrade to a newer version of Oracle first.

Cheers,
Walter Landry

[1] http://stackoverflow.com/questions/7480243/sql-oracle-order-by-and-limit


More information about the dal mailing list