"=?utf-8?B?56ug5pmo5pum?=" <zhangche...@halodbtech.com> writes: > I agree the application is not well designed for PostgreSQL because it was > migrated > from Oracle, and may not do such optimization. But back to this issue, even > though > we only create 10 temporary relations, it will cause 10 truncates on every > transaction. > Is that a good design?
[ shrug... ] If you create an ON COMMIT DELETE temp table, you are explicitly asking for a truncation to happen at every commit. I don't think you have much room to beef about the fact that one happens. Maybe you could merge some of these tables (adding an additional key column, probably) so that a single truncate suffices for all? regards, tom lane