Re: [GENERAL] Preferred usage for 'copy to' for a subset of data

2007-09-13 Thread Tom Lane
"Jason L. Buberel" <[EMAIL PROTECTED]> writes: > For recent postgres releases, is there any effective difference > (performance/memory/io) between: > create temp table foo as select * from bar where bar.date > '2007-01-01'; > copy foo to '/tmp/bar.out'; > drop table temp; > and this: > copy ( s

[GENERAL] Preferred usage for 'copy to' for a subset of data

2007-09-13 Thread Jason L. Buberel
For recent postgres releases, is there any effective difference (performance/memory/io) between: create temp table foo as select * from bar where bar.date > '2007-01-01'; copy foo to '/tmp/bar.out'; drop table temp; and this: copy ( select * from bar where bar.date > '2007-01-01' ) to '/tmp/ba