Performance optimizations done in develop targeted to master
- MATERIALIZED keywords added to CTE expressions used at API call methods
- Redefined few indexes to get better results on Postgres 12 or higher (previous ones (designed for Postgres 10) stopped to work efficiently probably due to changes in planner).