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

From 章晨曦
Subject Re: Performance issue on temporary relations
Date
Msg-id tencent_0211928407C6FF182A2AAB86@qq.com
Whole thread Raw
In response to Re: Performance issue on temporary relations  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Performance issue on temporary relations
List pgsql-hackers
> [ 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.

Yes. ON COMMIT DELETE temp table will be truncated at every commit.
But if we can control that only accessed temp tables will be truncated
may be better. When an temp tables accessed, it will be stored in in_use
list, and when on commit, it will check the in_use list if a truncation needed 
to happen on that temp table, and reduce unnecessary truncations.

Regards,
Jet

Halo Tech (www.halodbtech.com)
openHalo (www.openhalo.org)

pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: VM corruption on standby
Next
From: Kirill Reshke
Date:
Subject: Re: VM corruption on standby