The Study area database INSERT in the middleware is slow, being responsible for the most time in study setup:
- It is done one area at a time. It would be best to do an array insert; if not possible a multi-row INSERT by SELECT would do;
- The trigger code is slow on Postgres and needs to be pruned to speed it up
The Study area database INSERT in the middleware is slow, being responsible for the most time in study setup: