Re: Performance issue on temporary relations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Performance issue on temporary relations
Date
Msg-id 590159.1755621846@sss.pgh.pa.us
Whole thread Raw
In response to Re: Performance issue on temporary relations  ("章晨曦" <zhangchenxi@halodbtech.com>)
Responses Re: Performance issue on temporary relations
List pgsql-hackers
"=?utf-8?B?56ug5pmo5pum?=" <zhangchenxi@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



pgsql-hackers by date:

Previous
From: postgres@lobeshare.co.za
Date:
Subject: Adjusting my IDE expectations for a C extension development
Next
From: Robert Haas
Date:
Subject: RFC: extensible planner state