Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS: Tip and Tricks for Conesearch via TAP #202

Open
agy-why opened this issue Aug 9, 2023 · 0 comments
Open

DOCS: Tip and Tricks for Conesearch via TAP #202

agy-why opened this issue Aug 9, 2023 · 0 comments

Comments

@agy-why
Copy link
Member

agy-why commented Aug 9, 2023

When an indexed pos column is present in a table, the user should prefer the Postgres ConeSearch variant over the ADQL ConseSearch variant because the first one make use of the indexed column.

The translation of he ADQL query into a Postgres query can not assume that the pos column exists and as a results, uses the ra and dec values, preventing the use of the indexed column.

Finally in case of gal_ra and gal_dec, a simple convertion into equatorial coord allows the use of pos:

SELECT * FROM <gis_table> 
WHERE pos @ scircle(gal2eq(gal_ra, gal_dec), radius)

we could decide to provide such functions:

  • gal2eq: galactic coord to equatorial coord
  • eq2gal: equatorial coord to galactic coord
  • ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant