BioplatformsAustralia / bpaotu

OTU database access for the Australian Microbiome
GNU Affero General Public License v3.0
5 stars 1 forks source link

Sample query not using LIMIT … OFFSET … #239

Open hou098 opened 1 year ago

hou098 commented 1 year ago

views.otu_search() performs a query for the entire result set and caches that. That large set of values is then sliced down to a single page's worth in Python

This makes retrieving the first page worth of results really slow, unless it's cached.

Given that the query is sorted (check this), it should be possible to slice the unevaluated query (i.e. use select … limit … offset …)