<div dir="ltr"><div>Pat got it right :-)<br><br></div>  - Arnold<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">-------------------------------------------------------------------------------------------------------------<br>Arnold H. Rots                                          Chandra X-ray Science Center<br>Smithsonian Astrophysical Observatory                   tel:  +1 617 496 7701<br>60 Garden Street, MS 67                                      fax:  +1 617 495 7356<br>Cambridge, MA 02138                                         <a href="mailto:arots@cfa.harvard.edu" target="_blank">arots@cfa.harvard.edu</a><br>USA                                                   <a href="http://hea-www.harvard.edu/~arots/" target="_blank">http://hea-www.harvard.edu/~arots/</a><br>--------------------------------------------------------------------------------------------------------------<br><br></div></div></div>
<br><div class="gmail_quote">On Mon, Aug 31, 2015 at 3:37 PM, Patrick Dowler <span dir="ltr">&lt;<a href="mailto:patrick.dowler@nrc-cnrc.gc.ca" target="_blank">patrick.dowler@nrc-cnrc.gc.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 31/08/15 02:15 AM, Markus Demleitner wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Essentially, the question is:  What&#39;s to happen when MAXREC=200 is<br>
specified in a query parameter, and there&#39;s a TOP 4000 clause in<br>
QUERY?<br>
</blockquote>
<br></span>
Currently: the result must contain up to 200 rows and an overflow indicator at the end<br>
of the table if there are &gt; 200 matching rows. If we said that query-specific-limiter<br>
overrides MAXREC then that behaviour would have to change because overflow is<br>
relative to the effective MAXREC.<br>
<br>
The effective MAXREC is what the server decides and they are allowed to place such a<br>
limit. Think of it this way: the query defines a set of rows that the user is interested in<br>
and MAXREC is a negotiation about what will actually be returned. Since the service gets<br>
to decide the limit on return, the query (TOP) can&#39;t override effective MAXREC so should<br>
also not override requested MAXREC.<br>
<br>
>From a client point of view, MAXREC can be used (in addition to TOP) to test a query before<br>
running it (without MAXREC or with a larger value in case the service has a small default)... yeah,<br>
you could just change the TOP value or you could only use MAXREC.<br>
<br>
>From the point of view of the query capturing the query in the abstract, some of those contain<br>
limits and in that case I favour using TOP to keep the definition of the result set in one place.<br>
<br>
MAXREC - client-server agreement on size of output, with overflow indicator when applicable<br>
TOP - logical limit on membership in the row set<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Patrick Dowler<br>
Canadian Astronomy Data Centre<br>
National Research Council Canada<br>
5071 West Saanich Road<br>
Victoria, BC V9E 2E7<br>
<br>
<a href="tel:250-363-0044" value="+12503630044" target="_blank">250-363-0044</a> (office) <a href="tel:250-363-0045" value="+12503630045" target="_blank">250-363-0045</a> (fax)<br>
<br>
</font></span></blockquote></div><br></div>