ADQL XMATCH
Walter Landry
wlandry at caltech.edu
Wed Feb 10 15:45:34 CET 2016
Grégory Mantelet <gmantele at ari.uni-heidelberg.de> wrote:
> However, this kind of expression is performed by a sequential scan in
> the database. As far as I know, there is no way to index or optimize
> such constraint in a database (but I may be wrong so correct me if
> needed). On the contrary, "contains(point, circle)" can use an index
> (using PgSphere+Postgres for instance). So, I agree, it is ugly, but
> it is more efficient.
>
> Then, maybe it is also possible to use some trick like detecting
> "distance(ra1,dec1,ra2,dec2) < something" inside the ADQL query and
> translate it into the equivalent of "contains(point,circle)" in
> SQL....but it is really a ugly trick and may not be so trivial to
> implement.
In my parser (I can not speak for others), implementing this is just
recognizing this pattern to be semantically the same as CONTAINS. It
would be about the same amount of work as changing the parser to
recognize XMATCH. So not very much at all. I think this is the
easiest, most intuitive way forward, particularly with point literals.
Cheers,
Walter Landry
More information about the dal
mailing list