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

Bounding the BQ queries in an efficient way #35

Open
rosswhitaker opened this issue Nov 23, 2020 · 2 comments
Open

Bounding the BQ queries in an efficient way #35

rosswhitaker opened this issue Nov 23, 2020 · 2 comments

Comments

@rosswhitaker
Copy link
Contributor

rosswhitaker commented Nov 23, 2020

Need to investigate the tradeoff between computation on the BQ side and reporting records. Right now we reduce everything to lat-lon boxes in order to make queries computationally efficient. However,

  • could do an ellipse in lat/lon around the point using something like this
WHERE SQRT(POW(Latitude - @lat, 2) + POW(Longitude - @lon, 2)) <= @radius
    AND time > @start_date AND time < @end_date
    ORDER BY time ASC
  • Also could do this by spherical coordinates on the earth -- however we use a lat-lon box to save compute time on the BigQuery server

  • The right way to do it is to compute a radius in spherical coordinates on the earth's surface in kms.

@rosswhitaker
Copy link
Contributor Author

What's with the formatting on the text around this issue?

@0leks
Copy link
Collaborator

0leks commented Nov 23, 2020

@rosswhitaker markdown interprets # to make it title text of various sizes

title1

title2

etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants