Re: [HACKERS] Avoiding repeated ON COMMIT truncation for temporary tables

2011-03-15 Thread Bruce Momjian
Robert Haas wrote: > On Fri, Mar 11, 2011 at 8:07 PM, Bruce Momjian wrote: > > Currently, if you create a temporary table with the ON COMMIT action of > > DELETE ROWS, the table will truncated for every commit, whether there is > > any data in the table or not. > > > > I measured the overhead usin

Re: [HACKERS] Avoiding repeated ON COMMIT truncation for temporary tables

2011-03-14 Thread Merlin Moncure
On Mon, Mar 14, 2011 at 8:52 AM, Robert Haas wrote: > On Fri, Mar 11, 2011 at 8:07 PM, Bruce Momjian wrote: >> Currently, if you create a temporary table with the ON COMMIT action of >> DELETE ROWS, the table will truncated for every commit, whether there is >> any data in the table or not. >> >>

Re: [HACKERS] Avoiding repeated ON COMMIT truncation for temporary tables

2011-03-14 Thread Robert Haas
On Fri, Mar 11, 2011 at 8:07 PM, Bruce Momjian wrote: > Currently, if you create a temporary table with the ON COMMIT action of > DELETE ROWS, the table will truncated for every commit, whether there is > any data in the table or not. > > I measured the overhead using this test: > >        $ (echo

[HACKERS] Avoiding repeated ON COMMIT truncation for temporary tables

2011-03-11 Thread Bruce Momjian
Currently, if you create a temporary table with the ON COMMIT action of DELETE ROWS, the table will truncated for every commit, whether there is any data in the table or not. I measured the overhead using this test: $ (echo 'CREATE TEMPORARY TABLE TEST2 (x int);'; jot -b 'SELECT 1;'