Re: Modifying COPY TO - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Modifying COPY TO
Date
Msg-id 18834.1109393199@sss.pgh.pa.us
Whole thread Raw
In response to Re: Modifying COPY TO  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-hackers
"Jim C. Nasby" <decibel@decibel.org> writes:
> ... ISTM there's far more use for copying from a query
> result that just copying by index order.

Yeah.  The other point is that it's entirely likely that an external
sort will be faster than using an indexscan to produce the sorted order.
If you instead create a command like COPY FROM (SELECT whatever FROM foo ORDER BY something)
then you give the optimizer a chance at deciding what to do ... not that
I promise it will get it right, but a fixed choice is certain to be
wrong.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew - Supernews
Date:
Subject: Re: Modifying COPY TO
Next
From: Jeff Hoffmann
Date:
Subject: Re: Development Plans