What does TOP mean ?

Marco Molinaro molinaro at oats.inaf.it
Tue Apr 28 10:45:06 CEST 2015


Hi all,
leaving out the scoring topic related to TOP in SSAP, I wouldn't consider
the ADQL.TOP something to compare to to the TOP in SSAP.
Dave neatly pointed out the TAP perspective for the MAXREC + TOP layering,
that comes from two different interfaces, MAXREC for TAP, TOP inside ADQL.
In SSAP I think the user expects the same behavior, but the query part is
directly internal to the SSAP "parametric query language".
If (when?) a general PQL for IVOA comes up (again) we can discuss whether
for simple protocols it is better to change TOP into BEST (or whatever) not
to create confusion to users, or whether the PQL should keep as much as
possible the reserved words coming from the SQL experience of ADQL&TAP.

Cheers,
    Marco

ps - BTW, TOP was brought up also in Banff (IIRC) inside the pagination of
results...maybe this is something to keep in mind when there will be a need
to reuse/redefine it

2015-04-28 1:56 GMT+02:00 Douglas Tody <dtody at nrao.edu>:

> Yes; basically, TOP is another query parameter, whereas MAXREC controls
> the output processing, for any type of service and any query language.
>
>
>
> On Tue, 28 Apr 2015, Dave Morris wrote:
>
>
>> On 2015-04-27 16:03, Markus Demleitner wrote:
>>
>>>
>>> And regarding Walter's interjection:
>>>
>>>  I thought that the difference between MAXREC and TOP is that MAXREC
>>>> requires an overflow indicator, while TOP would prohibit it.
>>>>
>>>
>>> Interesting thought -- is it intended to work this way? [it doesn't
>>> in DaCHS, and a quick search in the 1.1 specs didn't give me anything
>>> pointing in that direction]
>>>
>>>
>> For a TAP service.
>>
>> I don't know what the specifications say, but as an end user, I would
>> expect that the server returns the lesser of the two, TOP or MAXREC.
>>
>> However, if MAXREC caused the truncation, then that would be an overflow,
>> if TOP cause the truncation, then it would not.
>>
>> If TOP > MAXREC, then return MAXREC rows and flag an overflow. Which
>> means this probably would hit MAXREC and return an overflow :
>>
>>    SELECT TOP 1000000000000000000 * FROM table
>>
>> If TOP < MAXREC, then return TOP rows and no overflow. So I would not
>> expect to get an overflow for this :
>>
>>    SELECT TOP 1 * FROM table
>>
>> I would probably expect the other services to behave in a similar manner.
>>
>> Hope this helps,
>> Dave
>>
>> --------
>> Dave Morris
>> Software Developer
>> Wide Field Astronomy Unit
>> Institute for Astronomy
>> University of Edinburgh
>> --------
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/dal/attachments/20150428/5d0e433c/attachment.html>


More information about the dal mailing list