Debugging slow queries
If Mission Portal seems to take too much time to generate pages or reports or if API calls seem to be taking too long. You can enable logging and analyzing slow queries in postgresql with the following changes:
/var/cfengine/state/pg/data/postgresql.conf. Add the following lines at the end of the filecode
session_preload_libraries = 'auto_explain' auto_explain.log_analyze = 'on' auto_explain.log_min_duration = 1000
log_min_durationis in milliseconds so adjust as needed.
See https://www.postgresql.org/docs/current/auto-explain.html for more details.
Observe the postgresql log at
/var/log/postgresql.log. Send the log with any bug report you wish to send.