plazi / treatmentBank

Repository devoted to house keeping of treatmentBank
0 stars 0 forks source link

very slow response to queries in SRS #98

Closed myrmoteras closed 1 year ago

myrmoteras commented 1 year ago

HI @gsautter

I tried this query, https://tb.plazi.org/GgServer/srsStats/stats?outputFields=doc.uuid+bib.year+tax.name+tax.genusEpithet+tax.speciesEpithet+tax.status+cntry.name&groupingFields=doc.uuid+bib.year+tax.name+tax.status+cntry.name&limit=100&FP-bib.year=2023&FP-tax.status=%22sp.%20nov.%22&FP-cntry.name=Australia&format=HTML and would not get a response within 5 minutes.

gsautter commented 1 year ago

The query takes about 2.5 seconds in the back-end according to the log ... not super fast, but considering the numerous joins (field groups "Treatment & User Data", "Taxonomic Data", "Countries", and "Bibliographic Metadata"), and filters on several tables (the latter three), 2.5 seconds is quite OK for data from over 850K treatments.

As to why it didn't send a response in over 5 minutes in this one instance, that's hard to say ... might have been the Tomcat getting sidetracked in garbage collection in that very instant, or some freak connectivity problem ... impossible to reproduce.