TAP 1.1, MAXREC and TOP

Patrick Dowler patrick.dowler at nrc-cnrc.gc.ca
Mon Aug 31 21:37:06 CEST 2015


On 31/08/15 02:15 AM, Markus Demleitner wrote:
> Essentially, the question is:  What's to happen when MAXREC=200 is
> specified in a query parameter, and there's a TOP 4000 clause in
> QUERY?

Currently: the result must contain up to 200 rows and an overflow 
indicator at the end
of the table if there are > 200 matching rows. If we said that 
query-specific-limiter
overrides MAXREC then that behaviour would have to change because 
overflow is
relative to the effective MAXREC.

The effective MAXREC is what the server decides and they are allowed to 
place such a
limit. Think of it this way: the query defines a set of rows that the 
user is interested in
and MAXREC is a negotiation about what will actually be returned. Since 
the service gets
to decide the limit on return, the query (TOP) can't override effective 
MAXREC so should
also not override requested MAXREC.

 From a client point of view, MAXREC can be used (in addition to TOP) to 
test a query before
running it (without MAXREC or with a larger value in case the service 
has a small default)... yeah,
you could just change the TOP value or you could only use MAXREC.

 From the point of view of the query capturing the query in the 
abstract, some of those contain
limits and in that case I favour using TOP to keep the definition of the 
result set in one place.

MAXREC - client-server agreement on size of output, with overflow 
indicator when applicable
TOP - logical limit on membership in the row set

-- 
Patrick Dowler
Canadian Astronomy Data Centre
National Research Council Canada
5071 West Saanich Road
Victoria, BC V9E 2E7

250-363-0044 (office) 250-363-0045 (fax)



More information about the dal mailing list