Finding performance problems in deeply nested PL/pgSQL business logic is difficult.One of the reasons is that PL/pgSQL hides anything happening in the PL code. None of the SQL queries inside of all the nested function and trigger calls ever shows up in...