aodn / nrmn-application

A web application for collation, validation, and storage of all data obtained during surveys conducted by the NRMN
GNU General Public License v3.0
4 stars 3 forks source link

4512 improve performance #1197

Closed utas-raymondng closed 1 year ago

utas-raymondng commented 1 year ago

Run a bit faster now, from the explain plan, the most costly part is still the string_agg (for diver and method)

-> GroupAggregate (cost=484002.59..520016.13 rows=29870 width=68) " Output: sm.survey_id, string_agg(DISTINCT (sm.method_id)::text, ', '::text ORDER BY (sm.method_id)::text), string_agg(DISTINCT (dr.full_name)::text, ', '::text ORDER BY (dr.full_name)::text)" Group Key: sm.survey_id

No species by default and hidden until you expand the filter. Max two species filter allowed