I have a function which creates many temporary tables and performs inserts, updates, deletes and selects on them.
Some columns are textual and I have a lot of
SIMILAR TO operations going on
The function is taking too long to execute and I don't know how to detect the problem, because I can't do an
explain analyze on temporary tables to detect expensive operations.
What could possibly be done? Any suggestion would be appreciated.