You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new option to limit the query return results, and return top n number. Related to sdss/zora#71
For more context, the feedback was "The idea would be to allow a person to test out a query without having to wait for a really long time.", which I think is to optionally just return a sample of results. In principle I like this idea. Generally this may be easy enough with peewee's paginate option or limit/offset.
The main long-running queries available right now are on target program/carton. Limit doesn't shorten these queries due to the distinct. See
Adding limit takes the query https://api.sdss.org/valis/query/carton-program?name=manual_mwm_tess_ob&name_type=carton&observed=true&release=DR17 from ~5 seconds to ~8 minutes. Switching from a distinct to group by reduces the query time with limit from 8 to 4 minutes. With no limit, it's still 5 seconds. Timings are from direct sql in a psql terminal.
The text was updated successfully, but these errors were encountered:
Add a new option to limit the query return results, and return top n number. Related to sdss/zora#71
For more context, the feedback was "The idea would be to allow a person to test out a query without having to wait for a really long time.", which I think is to optionally just return a sample of results. In principle I like this idea. Generally this may be easy enough with peewee's
paginate
option orlimit/offset
.The main long-running queries available right now are on target program/carton. Limit doesn't shorten these queries due to the
distinct
. Seevalis/python/valis/db/queries.py
Line 265 in b496410
Adding
limit
takes the queryhttps://api.sdss.org/valis/query/carton-program?name=manual_mwm_tess_ob&name_type=carton&observed=true&release=DR17
from ~5 seconds to ~8 minutes. Switching from adistinct
togroup by
reduces the query time with limit from 8 to 4 minutes. With no limit, it's still 5 seconds. Timings are from direct sql in a psql terminal.The text was updated successfully, but these errors were encountered: