Re: query produces 1 GB temp file
Greg Stark <gsstark@mit.edu>
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>, Dirk Lutzebaeck <lutzeb@aeccom.com>, pgsql-performance@postgresql.org
Date: 2005-02-05T22:50:13Z
Lists: pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> writes: > It was 700k rows to sort, not 22k. Oops, missed that. > > The temporary table does need to store three copies of the records at > > a given time, but still it sounds like an awful lot. > > Huh? Am I wrong? I thought the disk sort algorithm was the polyphase tape sort from Knuth which is always reading two tapes and writing to a third. -- greg